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 1641b3a commit d156654
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-$GITHUB_REF_NAME.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-$GITHUB_REF_NAME.zip
${{ env.APP_NAME }}-windows-${{ github.ref_name }}.zip
- uses: actions/upload-artifact@v3
with:
name: windows
path: ${{ env.APP_NAME }}-windows-$GITHUB_REF_NAME.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-$GITHUB_REF_NAME.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-$GITHUB_REF_NAME.tar.gz
${{ env.APP_NAME }}-web-${{ github.ref_name }}.tar.gz
- uses: actions/upload-artifact@v3
with:
name: web
path: ${{ env.APP_NAME }}-web-$GITHUB_REF_NAME.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 }}-$GITHUB_REF_NAME.apk
mv ./build/app/outputs/flutter-apk/app-release.apk.sha1 ${{ env.APP_NAME }}-$GITHUB_REF_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 }}-$GITHUB_REF_NAME.apk
${{ env.APP_NAME }}-$GITHUB_REF_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 }}-$GITHUB_REF_NAME.apk
path: ${{ env.APP_NAME }}-${{ github.ref_name }}.apk

0 comments on commit d156654

Please sign in to comment.