1.1.36 #117
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Upload Release | |
on: | |
release: | |
types: | |
- published | |
jobs: | |
build: | |
strategy: | |
matrix: | |
include: | |
- rootless: 0 | |
name: 'rootful' | |
- rootless: 1 | |
name: 'rootless' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.rootless }} | |
cancel-in-progress: true | |
name: Build (${{ matrix.name }}) | |
runs-on: macos-12 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install dependencies | |
run: brew install ldid make dpkg getsentry/tools/sentry-cli | |
- name: Set up Theos | |
uses: actions/checkout@v3 | |
with: | |
repository: theos/theos | |
path: theos | |
submodules: recursive | |
- name: Build package | |
id: build | |
env: | |
THEOS: theos | |
run: | | |
if [[ ${{ matrix.rootless }} == 0 ]]; then | |
sudo xcode-select -switch /Applications/Xcode_13.4.1.app | |
fi | |
echo '${{ secrets.ZEBRAKEYS_PRIVATE_H }}' > Zebra/ZebraKeys.private.h | |
gmake package FINALPACKAGE=1 ROOTLESS=${{ matrix.rootless }} | |
echo "package=$(basename $(cat .theos/last_package))" >> $GITHUB_OUTPUT | |
- name: Attach package to release | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
working-directory: packages | |
run: | | |
gh release upload '${{ github.event.release.tag_name }}' ${{ steps.build.outputs.package }} | |
- name: Upload symbols to Sentry | |
env: | |
SENTRY_ORG: ${{ secrets.SENTRY_ORG }} | |
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT_V1 }} | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
run: | | |
sentry-cli upload-dif .theos/obj/install_Zebra.xcarchive/dSYMs/* | |
- name: Clone zbrateam repo | |
run: | | |
git clone --depth=1 'https://zbrabot:${{ secrets.BOT_TOKEN }}@github.com/zbrateam/zbrateam.github.io.git' ~/website | |
- name: Copy package to repo | |
if: "!github.event.release.prerelease" | |
working-directory: packages | |
run: | | |
cp -f -- '${{ steps.build.outputs.package }}' ~/website/repo/pool | |
- name: Copy package to beta repo | |
if: "github.event.release.prerelease" | |
working-directory: packages | |
run: | | |
cp -f -- '${{ steps.build.outputs.package }}' ~/website/beta/pool | |
- name: Push repo changes | |
run: | | |
cd ~/website | |
git config --global user.name 'zbrabot' | |
git config --global user.email 'zbrabot[bot]@users.noreply.github.com' | |
git add . | |
rootless=$([[ ${{ matrix.rootless }} == 1 ]] && echo rootless || echo non-rootless) | |
git commit -m "${{ github.event.release.tag_name }} $rootless" | |
git push |