fix: Get release version from github tag properly

This commit is contained in:
Alberto Ponces 2022-09-14 12:27:56 +01:00
parent 6c30f9a63a
commit e117331159
2 changed files with 5 additions and 3 deletions

View File

@ -3,7 +3,7 @@ name: "Debug Build"
on: on:
push: push:
branches: branches:
- "master" - "flutter-disabled"
tags-ignore: tags-ignore:
- "*" - "*"

View File

@ -10,6 +10,8 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Set up JDK 12 - name: Set up JDK 12
uses: actions/setup-java@v1 uses: actions/setup-java@v1
with: with:
@ -26,10 +28,10 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: flutter build apk run: flutter build apk
- name: Add version to 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 - name: Publish release APK
uses: "marvinpinto/action-automatic-releases@latest" uses: "marvinpinto/action-automatic-releases@latest"
with: with:
repo_token: "${{ secrets.GITHUB_TOKEN }}" repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false prerelease: false
files: revanced-manager-$GITHUB_REF_NAME.apk files: revanced-manager-${{ env.RELEASE_VERSION }}.apk