-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (37 loc) · 1.25 KB
/
Copy pathrelease.yml
File metadata and controls
40 lines (37 loc) · 1.25 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
name: Release
on:
push:
tags: ["v*"]
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
with:
node-version: 22
cache: npm
- uses: browser-actions/setup-chrome@v2
id: setup-chrome
- run: npm ci
- run: npm audit --audit-level=moderate
- run: npm run verify
- run: npm run test:e2e
env:
BROWSER_PATH: ${{ steps.setup-chrome.outputs.chrome-path }}
STRICT_LOCALES: "1"
- name: Check release version
run: node -e "const p=require('./package.json'); if ('v'+p.version !== process.env.GITHUB_REF_NAME) process.exit(1)"
- name: Package extension
run: |
cd dist
zip -r "../header-patch-${GITHUB_REF_NAME}.zip" .
cd ..
sha256sum "header-patch-${GITHUB_REF_NAME}.zip" > "header-patch-${GITHUB_REF_NAME}.zip.sha256"
- name: Publish GitHub Release
run: gh release create "$GITHUB_REF_NAME" "header-patch-${GITHUB_REF_NAME}.zip" "header-patch-${GITHUB_REF_NAME}.zip.sha256" --generate-notes --title "Header Patch $GITHUB_REF_NAME"
env:
GH_TOKEN: ${{ github.token }}