Build and release #37
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
on: | |
workflow_dispatch: | |
inputs: | |
prerelease: | |
description: 'Pre-release?' | |
required: true | |
type: boolean | |
name: Build and release | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Build and release tweak | |
runs-on: macos-13 | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout main | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- name: Parse control file version | |
id: parse_control | |
run: | | |
version=$(sed -n 's/^Version: //p' control | sed 's/~/-/g') | |
echo "TWEAK_VERSION=$version" >> "$GITHUB_OUTPUT" | |
- name: Install Dependencies | |
run: brew install ldid dpkg make | |
- name: Set PATH environment variable | |
run: echo "$(brew --prefix make)/libexec/gnubin" >> $GITHUB_PATH | |
- name: Setup Theos | |
uses: actions/checkout@v4 | |
with: | |
repository: theos/theos | |
ref: master | |
path: theos | |
submodules: recursive | |
- name: Build rootful package | |
run: make package FINALPACKAGE=1 | |
env: | |
THEOS: ${{ github.workspace }}/theos | |
- name: make clean | |
run: make clean | |
env: | |
THEOS: ${{ github.workspace }}/theos | |
- name: Build rootless package | |
run: make package FINALPACKAGE=1 THEOS_PACKAGE_SCHEME=rootless | |
env: | |
THEOS: ${{ github.workspace }}/theos | |
- name: Add 'rootless' suffix to package name | |
run: mv packages/*-arm64.deb packages/$(ls packages | grep '\-arm64\.deb$' | sed 's/-arm64\.deb$/-arm64_rootless.deb/') | |
- name: Create release | |
id: create_release | |
uses: softprops/[email protected] | |
env: | |
TWEAK_VERSION: ${{ steps.parse_control.outputs.TWEAK_VERSION }} | |
with: | |
tag_name: v${{ env.TWEAK_VERSION }} | |
name: v${{ env.TWEAK_VERSION }} | |
files: | | |
packages/*.deb | |
prerelease: ${{ inputs.prerelease }} |