Skip to content

chore: bump version to 0.0.6+1 #21

chore: bump version to 0.0.6+1

chore: bump version to 0.0.6+1 #21

name: Flutter Release Workflow
on:
push:
tags:
- "v**"
# manually trigger a release if needed
workflow_dispatch:
jobs:
build:
permissions:
# write permission is required to create a github release
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Decode android/upload.jks
run: echo "${{ secrets.UPLOAD_KEYSTORE_JKS }}" | base64 --decode > android/upload.jks
- name: Decode android/key.properties
run: echo "${{ secrets.KEY_PROPERTIES }}" | base64 --decode > android/key.properties
- name: Checkout shelfsdk
uses: actions/checkout@v3
with:
repository: Dr-Blank/shelfsdk
path: ./shelfsdk
- name: Set Up Java
uses: actions/[email protected]
with:
distribution: "oracle"
java-version: "17"
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
- name: Install dependencies
run: flutter pub get
# - name: Run tests
# run: flutter test
- name: Build APK
run: flutter build apk --release
- name: Upload APK
uses: actions/upload-artifact@v4
with:
name: release-apk
path: build/app/outputs/flutter-apk/app-release.apk
- name: version
id: version
run: |
tag=${GITHUB_REF/refs\/tags\//}
version=${tag#v}
major=${version%%.*}
echo "tag=${tag}" >> $GITHUB_OUTPUT
echo "version=${version}" >> $GITHUB_OUTPUT
echo "major=${major}" >> $GITHUB_OUTPUT
- name: Generate Release Notes
id: generate_release_notes
uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Create GitHub Release
uses: ncipollo/release-action@v1
with:
artifacts: build/app/outputs/flutter-apk/app-release.apk
name: v${{ steps.version.outputs.version }}
tag: ${{ github.ref }}
body: ${{ steps.generate_release_notes.outputs.body }}