From e117331159abf8c033e2cb5c0a6e94ce0154138c Mon Sep 17 00:00:00 2001 From: Alberto Ponces Date: Wed, 14 Sep 2022 12:27:56 +0100 Subject: [PATCH] fix: Get release version from github tag properly --- .github/workflows/debug-build.yml | 2 +- .github/workflows/release-build.yml | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/debug-build.yml b/.github/workflows/debug-build.yml index 567a2d7c..172fb880 100644 --- a/.github/workflows/debug-build.yml +++ b/.github/workflows/debug-build.yml @@ -3,7 +3,7 @@ name: "Debug Build" on: push: branches: - - "master" + - "flutter-disabled" tags-ignore: - "*" diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml index 0ae908ee..709124d4 100644 --- a/.github/workflows/release-build.yml +++ b/.github/workflows/release-build.yml @@ -10,6 +10,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 + - name: Set env + run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - name: Set up JDK 12 uses: actions/setup-java@v1 with: @@ -26,10 +28,10 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: flutter build apk - name: Add version to APK - run: mv build/app/outputs/flutter-apk/app-release.apk revanced-manager-$GITHUB_REF_NAME.apk + run: mv build/app/outputs/flutter-apk/app-release.apk revanced-manager-${{ env.RELEASE_VERSION }}.apk - name: Publish release APK uses: "marvinpinto/action-automatic-releases@latest" with: repo_token: "${{ secrets.GITHUB_TOKEN }}" prerelease: false - files: revanced-manager-$GITHUB_REF_NAME.apk + files: revanced-manager-${{ env.RELEASE_VERSION }}.apk