Skip to content

Commit f00c2d5

Browse files
committed
Add publishing script
1 parent ada2bba commit f00c2d5

2 files changed

Lines changed: 36 additions & 0 deletions

File tree

MAINTAINERS.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Documentation for maintainers
2+
3+
## Publishing a new version
4+
5+
1. Create a git tag following the format `v[0-9]+.[0-9]+.[0-9]+`: `git tag v1.2.3`
6+
7+
> [!IMPORTANT]
8+
> Follow [semantic versioning](https://semver.org)!
9+
10+
1. Push the newly created tag: `git push origin v1.2.3`
11+
1. Release the new version by specifying the **tag** and providing your GitHub access token: `OPAM_PUBLISH_GH_TOKEN=xxx ./publish.sh v1.2.3`
12+
13+
The last step will fork the target opam registry, create a new branch with the new release, and open a PR back to the registry from the new branch. All of this will be performed in the name of the access token owner!
14+
15+
### Creating a GitHub access token
16+
17+
1. Go to <https://github.com/settings/tokens/new>
18+
2. Check the top-level checkboxes for:
19+
- repo
20+
- workflow

publish.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
if [ $# -eq 0 ] || [ -z "${OPAM_PUBLISH_GH_TOKEN:-}" ]; then
6+
echo "Usage: $0 <git-tag>"
7+
echo "Publishes to the Rocq opam repository"
8+
echo "Requires OPAM_PUBLISH_GH_TOKEN environment variable"
9+
exit 1
10+
fi
11+
12+
TAG="$1"
13+
VERSION="${TAG#v}"
14+
opam publish \
15+
--packages-directory=released/packages --repo rocq-prover/opam \
16+
--tag $TAG -v $VERSION epfl-systemf/StrictOrderSolver

0 commit comments

Comments
 (0)