Skip to content

ci: move build.sh into the workflow #23

ci: move build.sh into the workflow

ci: move build.sh into the workflow #23

Workflow file for this run

name: "pre-release"
on:
push:
branches:
- "master"
- "standalone"
workflow_dispatch:
jobs:
pre-release:
name: "Release"
runs-on: ubuntu-latest
steps:
- name: "Checkout Master Branch"
uses: actions/checkout@v3
with:
ref: 'master'
- name: "Build Master"
run: |
rm *.zip || true
ver=$(sed -n "s|^versionCode=||p" module.prop)
name=$(sed -n "s|^name=||p" module.prop | sed "s| |-|g")
newVersion=$(echo $ver | sed 's|\(.\)\(.\)\(.\)|\1.\2.\3|')
zip -r "${name}-${newVersion}.zip" . -x ".git/*" "LICENSE" "build.sh" ".gitignore" "*.zip"
echo "Made ${name}-${newVersion} ($ver)"
mv "${name}-${newVersion}.zip" "eMagisk-full-${ver}.zip"
- name: "Checkout Standalone Branch"
uses: actions/checkout@v3
with:
ref: 'standalone'
- name: "Build Standalone"
run: |
ver=$(sed -n "s|^versionCode=||p" module.prop)
name=$(sed -n "s|^name=||p" module.prop | sed "s| |-|g")
newVersion=$(echo $ver | sed 's|\(.\)\(.\)\(.\)|\1.\2.\3|')
zip -r "${name}-${newVersion}.zip" . -x ".git/*" "LICENSE" "build.sh" ".gitignore" "*.zip"
echo "Made ${name}-${newVersion} ($ver)"
mv "${name}-${newVersion}.zip" "eMagisk-noatlas-${ver}.zip"
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
title: "Latest Release v${{ env.MASTER_VERSION_CODE }} & v${{ env.STANDALONE_VERSION_CODE }}"
files: |
*.zip