Skip to content

Commit

Permalink
ci: make two releases per push
Browse files Browse the repository at this point in the history
  • Loading branch information
esauvisky authored Nov 13, 2023
1 parent 50ca4ef commit e5dcbab
Showing 1 changed file with 28 additions and 14 deletions.
42 changes: 28 additions & 14 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,49 @@ on:
push:
branches:
- "master"
- "standalone"
- "standalone"
workflow_dispatch:

jobs:
pre-release:
name: "Pre Release"
name: "Release"
runs-on: ubuntu-latest
strategy:
matrix:
branch: [master, standalone]
steps:
- uses: actions/checkout@v3
- name: "Checkout Master Branch"
uses: actions/checkout@v3
with:
ref: ${{ matrix.branch }}
ref: 'master'

- name: "Extract Master Version Code"
run: |
VERSION_CODE=$(grep 'version=' module.prop | cut -d'=' -f2)
echo "MASTER_VERSION_CODE=$VERSION_CODE" >> $GITHUB_ENV
- name: "Extract Version Code"
id: version_code
- name: "Build Master"
run: |
VERSION_CODE=$(grep 'versionCode=' module.prop | cut -d'=' -f2)
echo "VERSION_CODE=$VERSION_CODE" >> $GITHUB_ENV
echo "versionCode=$VERSION_CODE" >> $GITHUB_ENV
sh ./build.sh github
mv *.zip "eMagisk-full-${{ env.MASTER_VERSION_CODE }}.zip"
- name: "Checkout Standalone Branch"
uses: actions/checkout@v3
with:
ref: 'standalone'

- name: "Build"
- name: "Extract Standalone Version Code"
run: |
VERSION_CODE=$(grep 'version=' module.prop | cut -d'=' -f2)
echo "STANDALONE_VERSION_CODE=$VERSION_CODE" >> $GITHUB_ENV
- name: "Build Standalone"
run: |
sh ./build.sh github
mv *.zip "eMagisk-noatlas-${{ env.STANDALONE_VERSION_CODE }}.zip"
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "${{ matrix.branch }}-${{ env.versionCode }}"
automatic_release_tag: "release-v${{ env.MASTER_VERSION_CODE }}-v${{ env.STANDALONE_VERSION_CODE }}"
prerelease: true
title: "Combined Release v${{ env.MASTER_VERSION_CODE }} & v${{ env.STANDALONE_VERSION_CODE }}"
files: |
*.zip

0 comments on commit e5dcbab

Please sign in to comment.