Skip to content

Commit

Permalink
ci: add version to file name
Browse files Browse the repository at this point in the history
  • Loading branch information
MuZhou233 committed Nov 12, 2023
1 parent 2286bc8 commit 1641b3a
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@ jobs:
run: |
flutter config --enable-windows-desktop
flutter build windows --build-name=$GITHUB_REF_NAME --build-number=$GITHUB_RUN_NUMBER
Compress-Archive -Path .\build\windows\runner\Release\* -DestinationPath ${{ env.APP_NAME }}-windows.zip
Compress-Archive -Path .\build\windows\runner\Release\* -DestinationPath ${{ env.APP_NAME }}-windows-$GITHUB_REF_NAME.zip
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
${{ env.APP_NAME }}-windows.zip
${{ env.APP_NAME }}-windows-$GITHUB_REF_NAME.zip
- uses: actions/upload-artifact@v3
with:
name: windows
path: ${{ env.APP_NAME }}-windows.zip
path: ${{ env.APP_NAME }}-windows-$GITHUB_REF_NAME.zip

build-web:
runs-on: ubuntu-latest
Expand All @@ -46,19 +46,19 @@ jobs:
run: |
flutter pub get
flutter build web --build-name=$GITHUB_REF_NAME --build-number=$GITHUB_RUN_NUMBER
tar -zcvf ${{ env.APP_NAME }}-web.tar.gz ./build/web/*
tar -zcvf ${{ env.APP_NAME }}-web-$GITHUB_REF_NAME.tar.gz ./build/web/*
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
${{ env.APP_NAME }}-web.tar.gz
${{ env.APP_NAME }}-web-$GITHUB_REF_NAME.tar.gz
- uses: actions/upload-artifact@v3
with:
name: web
path: ${{ env.APP_NAME }}-web.tar.gz
path: ${{ env.APP_NAME }}-web-$GITHUB_REF_NAME.tar.gz

build-android:
runs-on: ubuntu-latest
Expand All @@ -76,18 +76,18 @@ jobs:
run: |
flutter pub get
flutter build apk --build-name=$GITHUB_REF_NAME --build-number=$GITHUB_RUN_NUMBER
mv ./build/app/outputs/flutter-apk/app-release.apk ${{ env.APP_NAME }}.apk
mv ./build/app/outputs/flutter-apk/app-release.apk.sha1 ${{ env.APP_NAME }}.apk.sha1
mv ./build/app/outputs/flutter-apk/app-release.apk ${{ env.APP_NAME }}-$GITHUB_REF_NAME.apk
mv ./build/app/outputs/flutter-apk/app-release.apk.sha1 ${{ env.APP_NAME }}-$GITHUB_REF_NAME.apk.sha1
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
${{ env.APP_NAME }}.apk
${{ env.APP_NAME }}.apk.sha1
${{ env.APP_NAME }}-$GITHUB_REF_NAME.apk
${{ env.APP_NAME }}-$GITHUB_REF_NAME.apk.sha1
- uses: actions/upload-artifact@v3
with:
name: android
path: ${{ env.APP_NAME }}.apk
path: ${{ env.APP_NAME }}-$GITHUB_REF_NAME.apk

0 comments on commit 1641b3a

Please sign in to comment.