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