'How do I upload my apk to Slack with Github Actions
I want to upload my Flutter APK to a slack channel, Solutions I got were pretty outdated,
name: CI
on:
push:
branches: [develop]
pull_request:
branches: [develop]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: "12.x"
- uses: subosito/flutter-action@v1
with:
flutter-version: "2.8.1"
- run: flutter pub get
- run: flutter pub run flutter_native_splash:create
- run: flutter pub run flutter_launcher_icons:main
- run: flutter build apk
- run: flutter build appbundle
- uses: actions/upload-artifact@v1
with:
name: release-apk
path: build/app/outputs/flutter-apk/app-release.apk
This is the current workflow that I have, It builds and adds it to Artefacts on Actions.
Solution 1:[1]
Easiest solution is to use one of Actions available in Marketplace:
jobs:
upload:
runs-on: ubuntu-latest
name: Upload APK
steps:
- name: Upload to slack step
uses: adrey/slack-file-upload-action@master
with:
token: ${{ secrets.SLACK_TOKEN }}
path: build/app/outputs/flutter-apk/app-release.apk
channel: apkchannel
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Grzegorz Krukowski |

