File tree Expand file tree Collapse file tree 5 files changed +75
-12
lines changed Expand file tree Collapse file tree 5 files changed +75
-12
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,16 @@ updates:
99 directory : " /"
1010 schedule :
1111 interval : " monthly"
12+ cooldown :
13+ default-days : 7
14+ groups :
15+ bump :
16+ applies-to : " version-updates"
17+ security :
18+ applies-to : " security-updates"
1219 - package-ecosystem : " github-actions"
1320 directory : " /"
1421 schedule :
1522 interval : " monthly"
23+ cooldown :
24+ default-days : 7
Original file line number Diff line number Diff line change 1+ name : Publish
2+ on :
3+ release :
4+ types : [published]
5+
6+ jobs :
7+ publish :
8+ runs-on : ubuntu-latest
9+ steps :
10+ - uses : actions/checkout@v5
11+ - name : Install toolchain
12+ run : |
13+ rustup toolchain install stable --profile minimal
14+ rustup default stable
15+ - name : Publish
16+ run : cargo publish
17+ env :
18+ CARGO_REGISTRY_TOKEN : ${{ secrets.CARGO_REGISTRY_TOKEN }}
19+
Original file line number Diff line number Diff line change 11name : Release
22on :
3- release :
4- types : [published]
3+ workflow_dispatch :
4+ inputs :
5+ version :
6+ type : string
7+ required : true
8+
9+
10+ env :
11+ VERSION : " ${{ inputs.version }}"
512
613jobs :
7- publish :
14+ release :
815 runs-on : ubuntu-latest
16+ permissions :
17+ contents : write
918 steps :
10- - uses : actions/checkout@v5
11- - name : Install toolchain
19+ - name : checkout
20+ uses : actions/checkout@v5
21+ with :
22+ persist-credentials : true
23+ fetch-depth : 0
24+ - name : Git setup
1225 run : |
13- rustup toolchain install stable --profile minimal
14- rustup default stable
15- - name : Publish
16- run : cargo publish
26+ git config user.name "github-actions[bot]"
27+ git config user.email " 41898282+github-actions[bot]@users.noreply.github.com"
28+ - name : Update changelog
29+ uses : orhun/git-cliff-action@d77b37db2e3f7398432d34b72a12aa3e2ba87e51 # v4.6.0
30+ with :
31+ args : " --unreleased"
1732 env :
18- CARGO_REGISTRY_TOKEN : ${{ secrets.CARGO_REGISTRY_TOKEN }}
33+ OUTPUT : release.md
34+ GIT_CLIFF_PREPEND : CHANGELOG.md
35+ GIT_CLIFF_TAG : " v${{ inputs.version }}"
36+ GITHUB_REPO : ${{ github.repository }}
37+ - name : Update Cargo.toml
38+ run : |
39+ awk -i inplace -f update-version.awk Cargo.toml
40+ - name : Commit and push changes
41+ run : |
42+ set +e
43+ git add CHANGELOG.md Cargo.toml
44+ git commit -m "Update version to ${VERSION}"
45+ git push "https://github.com/${GITHUB_REPOSITORY}.git" main
46+ - name : Create release
47+ run : |
48+ gh release create --notes-file release.md "v${VERSION}"
49+
1950
Original file line number Diff line number Diff line change @@ -4,5 +4,3 @@ Steps to create a new release:
442 . Run ` gi-cliff -p CHANGELOG.md -u -t <new-tag> ` to update the changelog
553 . Merge changes
664 . Publish a new release for the target tag.
7-
8- TODO: Create github action to do all of this.
Original file line number Diff line number Diff line change 1+ $0 == " [package]" { inpkg = 1 ; }
2+ inpkg && /^ version + = / {
3+ sub (/"[^ " ]* " /, " \" " ENVIRON [ " VERSION" ] " \" " )
4+ inpkg = 0
5+ }
6+ { print }
You can’t perform that action at this time.
0 commit comments