From 50ca4efe7ad27a3162f0b7f17df77ddc9ea3b9b7 Mon Sep 17 00:00:00 2001 From: emi~ Date: Sun, 12 Nov 2023 21:43:39 -0300 Subject: [PATCH] ci: make two releases per push --- .github/workflows/main.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d420f1c..fc66210 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,22 +4,35 @@ on: push: branches: - "master" - - "standalone" + - "standalone" workflow_dispatch: jobs: pre-release: name: "Pre Release" runs-on: ubuntu-latest + strategy: + matrix: + branch: [master, standalone] steps: - uses: actions/checkout@v3 + with: + ref: ${{ matrix.branch }} + + - name: "Extract Version Code" + id: version_code + run: | + VERSION_CODE=$(grep 'versionCode=' module.prop | cut -d'=' -f2) + echo "VERSION_CODE=$VERSION_CODE" >> $GITHUB_ENV + echo "versionCode=$VERSION_CODE" >> $GITHUB_ENV + - name: "Build" run: | sh ./build.sh github - uses: "marvinpinto/action-automatic-releases@latest" with: repo_token: "${{ secrets.GITHUB_TOKEN }}" - automatic_release_tag: "latest" + automatic_release_tag: "${{ matrix.branch }}-${{ env.versionCode }}" prerelease: true files: | *.zip