-
-
Notifications
You must be signed in to change notification settings - Fork 141
Expand file tree
/
Copy pathrelease.sh
More file actions
executable file
·45 lines (40 loc) · 1.74 KB
/
Copy pathrelease.sh
File metadata and controls
executable file
·45 lines (40 loc) · 1.74 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
#!/bin/bash
# Releases run on GitHub Actions — see .github/workflows/release.yml. This
# script is a thin wrapper that triggers the workflow and (separately) syncs
# the browsertime help reference and version include into the sibling
# ../sitespeed.io checkout. That sibling write is the one piece of the
# release flow that can only happen on the maintainer's machine.
set -e
case "${1:-}" in
patch|minor|major)
gh workflow run release.yml -f releaseType="$1"
echo "Release workflow triggered. Track it with: gh run watch"
;;
sync-sitespeed-docs)
if [ -d "../sitespeed.io" ]; then
echo "Updating ../sitespeed.io browsertime docs and version include…"
bin/browsertime.js --help > ../sitespeed.io/docs/documentation/browsertime/configuration/config.md
bin/browsertime.js --version | tr -d '\n' > ../sitespeed.io/docs/_includes/version/browsertime.txt
echo " Remember to commit & push the changes in ../sitespeed.io"
else
echo "No sitespeed.io checkout at ../sitespeed.io — nothing to sync"
fi
;;
*)
cat <<'EOF'
Usage: ./release.sh <patch|minor|major>
./release.sh sync-sitespeed-docs
The patch/minor/major form triggers the GitHub Actions release workflow
(.github/workflows/release.yml). The actual release — version bump,
TypeScript declaration regen, npm publish with provenance, SBOM
generation, GitHub release and Docker image build via
building-docker.yml — happens on GitHub from there.
After the release completes:
git pull origin main
./release.sh sync-sitespeed-docs # only if ../sitespeed.io is checked out
Trusted Publishing on npmjs.com must be configured for the browsertime
package to trust this workflow; without it the publish step fails.
EOF
exit 1
;;
esac