File tree Expand file tree Collapse file tree 3 files changed +27
-4
lines changed Expand file tree Collapse file tree 3 files changed +27
-4
lines changed Original file line number Diff line number Diff line change 2525 uses : julia-actions/setup-julia@latest
2626 with :
2727 version : ${{ matrix.julia-version }}
28+ - name : Tag commit
29+ env :
30+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
31+ run : deps/gh-auto-tag
2832 - name : Install dependencies
2933 run : julia -e 'using Pkg; Pkg.add("BinaryProvider"); Pkg.add("BinaryBuilder");'
3034 - name : Build
Original file line number Diff line number Diff line change @@ -80,7 +80,5 @@ Disclaimer: This feature is still experimental and should only be used with caut
8080## For Developer
8181
8282### Release a new version
83- 1. Update the new version number in `Project.toml`;
84- 2. Commit all the changes;
85- 3. Tag the current commit with git, the tag name should be version number with a preceding "v";
86- 4. Push the tag to the repo on GitHub, then make a release on the tag.
83+ Update the new version number in `Project.toml`, a tag to that
84+ version will be made by the GitHub Actions after it is pushed.
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ git fetch --tags
4+
5+ TAGS=($( git tag) )
6+ CTAG=$( perl -ne ' print "v$1" if m#version\s*=\s*"(.*)"#' Project.toml)
7+ COMMIT=$( git rev-parse HEAD)
8+
9+ if [[ ! " ${TAGS[@]} " =~ " ${CTAG} " ]]; then
10+ GIT_REFS_URL=$( jq .repository.git_refs_url $GITHUB_EVENT_PATH | tr -d ' "' | sed ' s/{\/sha}//g' )
11+
12+ curl -s -X POST $GIT_REFS_URL \
13+ -H " Authorization: token ${GITHUB_TOKEN} " \
14+ -d @- << EOF
15+ {
16+ "ref": "refs/tags/$CTAG ",
17+ "sha": "$COMMIT "
18+ }
19+ EOF
20+
21+ fi
You can’t perform that action at this time.
0 commit comments