doc #67
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
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 ./tmp | |
- run: "mkdir ./tmp" | |
# Unzip committed zip files into ./tmp | |
- run: "unzip ./dist/chrome.zip -d ./tmp/chrome" | |
- run: "unzip ./dist/firefox.zip -d ./tmp/firefox" | |
- run: "unzip ./dist/website.zip -d ./tmp/website" | |
# Copy committed IPFS hashes into ./tmp | |
- run: "cp ./dist/.ipfs.md ./tmp/.ipfs.md" | |
- run: "cp ./dist/.website.ipfs.md ./tmp/.website.ipfs.md" | |
# Rebuild | |
- run: "npm ci && npm run build" | |
# Compare unzipped content | |
- run: "diff -r ./tmp/chrome ./dist/chrome" | |
- run: "diff -r ./tmp/firefox ./dist/firefox" | |
- run: "diff -r ./tmp/website ./dist/website" | |
# Compare IPFS hashes | |
- run: "diff ./tmp/.ipfs.md ./dist/.ipfs.md" | |
- run: "diff ./tmp/.website.ipfs.md ./dist/.website.ipfs.md" | |
# Delete ./tmp | |
- run: "rm -rf ./tmp" | |
# Restore build files | |
- run: "git restore ./dist" | |
# Compare other files | |
- run: "git status --porcelain" | |
- run: "[[ -z $(git status --porcelain) ]]" |