File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 1414jobs :
1515 checks :
1616 uses : ./.github/workflows/checks.yml
17+
1718 publish-crates-io :
1819 name : Publish prerelease to crates.io
1920 runs-on : ubuntu-latest
3334 - name : Compute prerelease version
3435 id : version
3536 run : |
36- BASE_VERSION=$(cargo metadata --format-version=1 --no-deps | jq ".packages[1].version")
37- PRERELEASE_VERSION="${BASE_VERSION}-alpha.${GITHUB_SHA::7}"
37+ # Get base version from Cargo.toml (0.0.0)
38+ BASE_VERSION=$(cargo metadata --format-version=1 --no-deps \
39+ | jq -r '.packages[] | select(.name=="libtortillas") | .version')
40+
41+ # Strip patch for next prerelease (0.0.1-alpha.<sha>)
42+ NEXT_VERSION=$(echo "$BASE_VERSION" | awk -F. \
43+ '{ printf "%d.%d.%d", $1, $2, $3+1 }')
44+
45+ PRERELEASE_VERSION="${NEXT_VERSION}-alpha.${GITHUB_SHA::7}"
46+
3847 echo "prerelease_version=$PRERELEASE_VERSION" >> $GITHUB_OUTPUT
3948
4049 - name : Set prerelease version
You can’t perform that action at this time.
0 commit comments