diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 939bca8..d5c3145 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,3 +60,12 @@ jobs: git config user.email "41898282+github-actions[bot]@users.noreply.github.com" git branch --set-upstream-to=origin/main main swipl -g "pack_publish('.', [sign(false), branch(main), interactive(false)])" -t halt + - name: GitHub release of the tag + env: + GH_TOKEN: ${{ github.token }} + run: | + VERSION="$(swipl -g "read_file_to_terms('pack.pl', Terms, []), memberchk(version(Version), Terms), write(Version)" -t halt)" + test -n "$VERSION" + if ! gh release view "V$VERSION" > /dev/null 2>&1; then + gh release create "V$VERSION" --verify-tag --title "V$VERSION" --generate-notes + fi diff --git a/README.md b/README.md index 4c565f2..e2de054 100644 --- a/README.md +++ b/README.md @@ -148,7 +148,8 @@ Open pull requests against `main`. `main` changes only by merging a pull request with a merge commit, and every merge into `main` is a release: CI runs `swipl pack publish` on the merged `main`, which tags `V` from the `version/1` of `pack.pl`, installs the pack from this repository -in an isolated directory and registers it with the SWI-Prolog pack server. +in an isolated directory and registers it with the SWI-Prolog pack server; +CI then makes the GitHub release of the tag, with notes GitHub generates. A pull request into `main` must therefore raise `version/1` above every released version; a required check enforces it. diff --git a/pack.pl b/pack.pl index 89211c0..efdfc37 100644 --- a/pack.pl +++ b/pack.pl @@ -1,5 +1,5 @@ name(hash_consing). -version('0.2.1'). +version('0.2.2'). title('Hash-consed terms by clause rewriting'). keywords([interning, 'hash-consing', trie, term_expansion]). author('Yang, Bo', 'yang-bo@yang-bo.com').