Skip to content

Commit fa2e3e8

Browse files
committed
chore: update crate release flow
1 parent 618e863 commit fa2e3e8

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

.github/workflows/release-plz.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ on:
1414
default: false
1515

1616
permissions:
17+
# trust publish needs
1718
id-token: write
19+
# push tag
20+
contents: write
1821

1922
jobs:
2023
release-plz:
@@ -47,4 +50,12 @@ jobs:
4750
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
4851

4952
- name: Push tag
50-
run: git push origin ${{ inputs.commit }}
53+
run: |
54+
version=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[] | select(.name == "crate_name") | .version')
55+
echo tagging v$version
56+
git config --global --add safe.directory /github/workspace
57+
git config --global user.name "github-actions[bot]"
58+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
59+
git status
60+
# git tag v$version -m v$version
61+
# git push origin --follow-tags

0 commit comments

Comments
 (0)