forked from open-wallet-standard/core
-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (57 loc) · 2.16 KB
/
Copy pathversion-bump.yml
File metadata and controls
71 lines (57 loc) · 2.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Version Bump PR
on:
push:
tags:
- "v*"
permissions:
contents: write
pull-requests: write
jobs:
version-bump-pr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: main
token: ${{ secrets.PRIVATE_REPOS_WRITE_PR }}
- name: Set up Rust (for cargo update in set-version)
uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable
- name: Set up Node.js (for npm/jq in set-version)
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: "22"
- name: Bump version in source files
run: |
V="${GITHUB_REF_NAME#v}"
"$GITHUB_WORKSPACE/scripts/set-version.sh" "$V" --all
- name: Generate READMEs
run: ./readme/generate.sh
- name: Create Pull Request
env:
GH_TOKEN: ${{ secrets.PRIVATE_REPOS_WRITE_PR }}
run: |
V="${GITHUB_REF_NAME#v}"
BRANCH="chore/bump-version-${V}"
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add -A
if git diff --staged --quiet; then
echo "No version changes needed"
exit 0
fi
git checkout -b "$BRANCH"
git commit -m "chore: bump version to $V"
git push origin "$BRANCH"
gh pr create \
--title "chore: bump version to $V" \
--body "## Summary
Automated version bump to \`$V\` triggered by tag [\`${GITHUB_REF_NAME}\`](https://github.com/${{ github.repository }}/releases/tag/${GITHUB_REF_NAME}).
### Changes
- Rust crate versions (\`Cargo.toml\`)
- Python binding version (\`pyproject.toml\`, \`Cargo.toml\`)
- Node binding version (\`package.json\`, \`Cargo.toml\`, platform packages)
- Skill manifest version (\`SKILL.md\`)
- Docs site version badge and heading (\`website-docs/\`)
- Regenerated READMEs" \
--base main \
--head "$BRANCH"