update build scripts #60
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: tagged-release | |
on: | |
push: | |
tags: | |
- "v*" | |
permissions: | |
id-token: "write" | |
contents: "write" | |
jobs: | |
build_and_release: | |
runs-on: macos-12 | |
steps: | |
- run: echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV | |
- uses: actions/checkout@v4 | |
with: | |
ref: master | |
- name: Update manifest.json version | |
uses: jossef/[email protected] | |
with: | |
file: src/manifest.json | |
field: version | |
value: ${{ env.VERSION }} | |
- name: Update manifest.v2.json version | |
uses: jossef/[email protected] | |
with: | |
file: src/manifest.v2.json | |
field: version | |
value: ${{ env.VERSION }} | |
- name: Push files | |
continue-on-error: true | |
run: | | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git config --global user.name "github-actions[bot]" | |
git commit -am "release v${{ env.VERSION }}" | |
git push | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- run: npm ci | |
- uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: 14.2 | |
- run: sed -i '' "s/0.0.0/${{ env.VERSION }}/g" safari/project.pre.patch | |
- run: sed -i '' "s/0.0.0/${{ env.VERSION }}/g" safari/project.patch | |
- run: npm run build:safari | |
- uses: marvinpinto/[email protected] | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
prerelease: false | |
files: | | |
build/chromium.zip | |
build/firefox.zip | |
build/safari.dmg | |
build/chromium-without-katex-and-tiktoken.zip | |
build/firefox-without-katex-and-tiktoken.zip |