forked from josStorer/chatGPTBox
-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (60 loc) · 2.07 KB
/
tagged-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: tagged-release
on:
push:
tags:
- "v*"
permissions:
id-token: "write"
contents: "write"
env:
GH_TOKEN: ${{ github.token }}
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
- run: |
gh release create ${{github.ref_name}} -d -F CURRENT_CHANGE.md -t ${{github.ref_name}}
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- uses: actions/setup-python@v5
with:
python-version: '3.10' # for appdmg
- 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
- run: |
gh release upload ${{github.ref_name}} build/chromium.zip
gh release upload ${{github.ref_name}} build/firefox.zip
gh release upload ${{github.ref_name}} build/safari.dmg
gh release upload ${{github.ref_name}} build/chromium-without-katex-and-tiktoken.zip
gh release upload ${{github.ref_name}} build/firefox-without-katex-and-tiktoken.zip
- run: |
gh release edit ${{github.ref_name}} --draft=false