File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 27
27
runs-on : ubuntu-latest
28
28
steps :
29
29
- uses : actions/checkout@v4
30
+ with :
31
+ fetch-depth : 0
32
+ filter : " blob:none"
30
33
- uses : actions/setup-python@v5
31
34
with :
32
35
python-version : 3
36
39
git clean -fxd tools/schemacode
37
40
- name : Checkout jsr-dist
38
41
run : |
39
- git fetch --depth=1 origin jsr-dist
40
42
git checkout -t origin/jsr-dist
41
43
- name : Regenerate schema
42
44
run : bst export > schema.json
59
61
jq ".version = \"$VERSION\"" jsr.json > tmp.json && mv tmp.json jsr.json
60
62
else
61
63
DENOVER=$( jq -r .version jsr.json )
62
- # Should switch to using the commit hash of the source repo?
63
- HASH=$( sha256sum schema.json | head -c 7 )
64
+ # Get the reference of the latest commit to touch the schema directory
65
+ HASH=$( git log -n 1 --pretty=%h $REF -- src/schema )
64
66
if [[ $DENOVER =~ ^"$BASE".[0-9] ]]; then
65
67
PREFIX=${DENOVER%+*}
66
68
let SERIAL=1+${PREFIX#$BASE.}
70
72
VERSION="$BASE.$SERIAL+$HASH"
71
73
fi
72
74
echo VERSION=$VERSION | tee -a $GITHUB_ENV
75
+ env :
76
+ REF : ${{ github.ref }}
73
77
- name : Check for changes, set version and commit
74
78
run : |
75
79
if ! git diff -s --exit-code; then
You can’t perform that action at this time.
0 commit comments