-
Notifications
You must be signed in to change notification settings - Fork 12
36 lines (34 loc) · 1.05 KB
/
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
on: [push]
name: release
jobs:
check:
name: check
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
node-version: 20.x
- uses: actions/setup-node@v3
with:
node-version: 20.x
# Create ./unzipped
- run: "mkdir ./unzipped"
# Unzip committed zip files into ./unzipped
- run: "unzip ./dist/chrome.zip -d ./unzipped/chrome"
- run: "unzip ./dist/firefox.zip -d ./unzipped/firefox"
- run: "unzip ./dist/website.zip -d ./unzipped/website"
# Rebuild
- run: "npm ci && npm run build"
# Compare unzipped committed zip files and built folders
- run: "diff -r ./unzipped/chrome ./dist/chrome"
- run: "diff -r ./unzipped/firefox ./dist/firefox"
- run: "diff -r ./unzipped/website ./dist/website"
# Delete ./unzipped
- run: "rm -rf ./unzipped"
# Restore build files
- run: "git restore ./dist"
# Recompute IPFS hashes
- run: "node ./scripts/ipfs.mjs"
# Compare all files
- run: "git status --porcelain"
- run: "[[ -z $(git status --porcelain) ]]"