-
-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (66 loc) · 2.23 KB
/
release.yml
File metadata and controls
79 lines (66 loc) · 2.23 KB
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
72
73
74
75
76
77
78
79
name: Release Package
on:
push:
branches: [release]
workflow_dispatch:
permissions:
contents: write
issues: write
jobs:
release:
name: Build and Publish Package
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
persist-credentials: false
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.15.0
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "22"
- name: Install just
uses: extractions/setup-just@v3
- name: Install dependencies
run: just deps
- name: Build and package extension
run: just package
- name: Configure Git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Run semantic-release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
GIT_AUTHOR_NAME: github-actions[bot]
GIT_AUTHOR_EMAIL: github-actions[bot]@users.noreply.github.com
GIT_COMMITTER_NAME: github-actions[bot]
GIT_COMMITTER_EMAIL: github-actions[bot]@users.noreply.github.com
HUSKY: 0
- name: Upload to Chrome Web Store
id: chrome_upload
uses: mnao305/chrome-extension-upload@v5.0.0
with:
file-path: extension/extension.zip
extension-id: ${{ secrets.CHROME_EXTENSION_ID }}
client-id: ${{ secrets.CHROME_CLIENT_ID }}
client-secret: ${{ secrets.CHROME_CLIENT_SECRET }}
refresh-token: ${{ secrets.CHROME_REFRESH_TOKEN }}
publish: true
- name: Sync release to main
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git fetch origin release
git fetch origin main
git checkout main
git merge origin/release --no-edit
git push https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.git main
env:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}