diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml index 3b311e8e5a..530fc24c15 100644 --- a/.github/workflows/release-build.yml +++ b/.github/workflows/release-build.yml @@ -26,15 +26,19 @@ jobs: - name: Bump version code env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: npx semantic-release --extends ./.releaserc.bump.json + run: npx semantic-release - name: Set env - run: echo "RELEASE_VERSION=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV + run: | + echo "RELEASE_VERSION=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV + echo "BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_ENV - name: Rename APK run: mv build/app/outputs/apk/release/app-release.apk revanced-manager-${{ env.RELEASE_VERSION }}.apk - name: Publish release APK - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: npx semantic-release --extends ./.releaserc.release.json + uses: "marvinpinto/action-automatic-releases@latest" + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + prerelease: ${{ env.BRANCH == 'dev' }} + files: revanced-manager-${{ env.RELEASE_VERSION }}.apk diff --git a/.releaserc.bump.json b/.releaserc similarity index 82% rename from .releaserc.bump.json rename to .releaserc index 82a1d94880..be6edb39fa 100644 --- a/.releaserc.bump.json +++ b/.releaserc @@ -25,6 +25,14 @@ } ] } + ], + [ + "@semantic-release/git", + { + "assets": [ + "pubspec.yaml" + ] + } ] ] }