Skip to content

change github action tag #4

change github action tag

change github action tag #4

Workflow file for this run

name: Flutter app build and release
env:
TAG_NAME: "v4"
RELEASE_TITLE: "Transfer-client v4"
on:
push:
paths-ignore:
- "**/*.md"
jobs:
linux:
name: Build linux app
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup dart and flutter
uses: subosito/flutter-action@v2
with:
flutter-version: "3.13.8"
- name: Patch for linux build
run: |
flutter doctor
sudo apt-get update -y
sudo apt-get install -y ninja-build libgtk-3-dev
flutter doctor
- name: flutter get dependency
run: |
flutter pub get
- name: Build and compress
run: |
flutter build linux --obfuscate --split-debug-info=tcli.debug-info
tar zcvf tcli_linux64.tar.gz ./build/linux/x64/release/bundle
- name: "Uplaod artifact"
uses: actions/upload-artifact@v3
with:
name: tcli-linux
path: |
./tcli_linux64.tar.gz
retention-days: 1
android:
name: Build android apk
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup dart and flutter
uses: subosito/flutter-action@v2
with:
flutter-version: "3.13.8"
- name: flutter get dependency
run: |
flutter pub get
- name: Build apk
run: |
flutter build apk --no-shrink --split-per-abi --obfuscate --split-debug-info=tcli.debug-info
- name: "Uplaod artifact"
uses: actions/upload-artifact@v3
with:
name: tcli-android
path: |
./build/app/outputs/apk/release/*
retention-days: 1
publish:
needs: [linux, android]
runs-on: ubuntu-latest
env:
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ secrets.RELEASE_TOKEN }}
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y gettext-base
- name: Delete existing release
run: |
gh release delete $TAG_NAME --yes || true
- name: Create Release and Upload Release Asset
run: |
gh release create $TAG_NAME --notes-file "./.github/workflows/release_note.md" --title "$RELEASE_TITLE" --target $GITHUB_SHA tcli-linux/* tcli-android/*