Add .forgejo/work/build-mac.yml
This commit is contained in:
parent
84d7f4c7e0
commit
b4b2555c01
1 changed files with 69 additions and 0 deletions
69
.forgejo/work/build-mac.yml
Normal file
69
.forgejo/work/build-mac.yml
Normal file
|
@ -0,0 +1,69 @@
|
|||
name: Build Firefox on macOS
|
||||
|
||||
on:
|
||||
repository_dispatch:
|
||||
inputs:
|
||||
debugger_keyword:
|
||||
description: "Name of the debugger keyword"
|
||||
required: false
|
||||
default: ""
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: macos-latest
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- name: Install Mercurial
|
||||
run: python3 -m pip install --break-system-packages -U mercurial
|
||||
|
||||
- name: Bootstrap Mozilla Source
|
||||
run: |
|
||||
curl https://hg.mozilla.org/mozilla-central/raw-file/default/python/mozboot/bin/bootstrap.py -O
|
||||
python3 bootstrap.py --application-choice=browser --no-interactive
|
||||
|
||||
- name: Update Local Source
|
||||
working-directory: ./mozilla-unified
|
||||
run: hg up -C central
|
||||
|
||||
- name: Initialize `mozconfig`
|
||||
working-directory: ./mozilla-unified
|
||||
run: echo "ac_add_options --with-branding=browser/branding/unofficial" > mozconfig
|
||||
|
||||
- name: Get foxified profile
|
||||
working-directory: ./
|
||||
run: git clone "https://github.com/Sneed-Group/sneedium2-foxified-profile"
|
||||
|
||||
- name: Initialize `foxified profile`
|
||||
working-directory: ./mozilla-unified
|
||||
run: cp -r ../sneedium2-foxified-profile/ .
|
||||
|
||||
- name: Set Release Tag Output
|
||||
id: release-tag
|
||||
run: echo "NOW=$(date +'%Y%m%d%H%M%S')" >> $FORGEJO_OUTPUT
|
||||
|
||||
- name: Construct New `debugger` Keyword
|
||||
id: debugger-keyword
|
||||
run: echo "DEBUGGER_KEYWORD=${{ inputs.debugger_keyword || 'debugger' + steps.release-tag.outputs.NOW }}" >> $FORGEJO_OUTPUT
|
||||
|
||||
- name: Replace `debugger` Keyword
|
||||
working-directory: ./mozilla-unified
|
||||
run: sed -i '' -e 's/MACRO(debugger/MACRO(${ steps.debugger-keyword.outputs.DEBUGGER_KEYWORD })/' ./js/src/frontend/ReservedWords.h
|
||||
|
||||
- name: Build and Package
|
||||
working-directory: ./mozilla-unified
|
||||
run: |
|
||||
./mach build
|
||||
./mach package
|
||||
|
||||
- name: Upload Artifacts
|
||||
run: |
|
||||
mkdir -p /tmp/artifacts
|
||||
cp ./mozilla-unified/*apple-darwin*/dist/firefox*.mac.dmg /tmp/artifacts/
|
||||
curl -X POST -F "file=@/tmp/artifacts/*" https://your-forgejo-instance/api/v1/repositories/{repo_id}/releases/assets
|
||||
|
||||
- name: Create Release
|
||||
run: |
|
||||
curl -X POST -H "Authorization: token $FORGEJO_TOKEN" \
|
||||
-d '{"tag_name": "macos-${{ steps.release-tag.outputs.NOW }}", "name": "macos release"}' \
|
||||
https://your-forgejo-instance/api/v1/repos/{owner}/{repo}/releases
|
Loading…
Reference in a new issue