-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
155 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
|
||
# This script is used to edit the version in versions files | ||
|
||
echo "Editing files with given version: $1"; | ||
|
||
# Edit Cargo.toml | ||
semantic-release-cargo prepare "$1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,8 @@ name: Clippy checks | |
|
||
on: | ||
push: | ||
branches: [ main ] | ||
branches: | ||
- develop | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Release | ||
|
||
on: | ||
workflow_dispatch: # only for release on develop branch | ||
push: | ||
branches: | ||
- main | ||
- rc | ||
- experimental | ||
- "[0-9]+.[0-9]+.x" | ||
- "[0-9]+.x" | ||
|
||
# Only allow one release workflow to execute at a time, since each release | ||
# workflow uses shared resources (git tags, package registries) | ||
concurrency: | ||
group: ${{ github.workflow }} | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-22.04 | ||
permissions: | ||
contents: write # to be able to publish a GitHub release | ||
issues: write # to be able to comment on released issues | ||
pull-requests: write # to be able to comment on released pull requests | ||
id-token: write # to enable use of OIDC for npm provenance | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false # Semantic release need use SCOPED_GITHUB_TOKEN to create release | ||
|
||
- name: Install semantic-release-cargo | ||
uses: EricCrosson/install-github-release-binary@v2 | ||
with: | ||
targets: semantic-release-cargo/semantic-release-cargo@v2.2.30 | ||
|
||
- name: Semantic Release | ||
uses: cycjimmy/semantic-release-action@v4 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.SCOPED_GITHUB_TOKEN }} | ||
with: | ||
semantic_version: 22.0.6 | ||
extra_plugins: | | ||
@semantic-release/changelog@6.0.3 | ||
@semantic-release/git@10.0.1 | ||
@semantic-release/exec@6.0.3 | ||
conventional-changelog-conventionalcommits@7.0.2 | ||
@saithodev/semantic-release-backmerge@3.2.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
{ | ||
"tagFormat": "${version}", | ||
"branches": [ | ||
"main", | ||
{ | ||
"name": "rc", | ||
"prerelease": true | ||
}, | ||
{ | ||
"name": "develop", | ||
"prerelease": "dev" | ||
}, | ||
{ | ||
"name": "experimental", | ||
"prerelease": "exp" | ||
}, | ||
"+([0-9])?(.{+([0-9]),x}).x" | ||
], | ||
"plugins": [ | ||
[ | ||
"@semantic-release/commit-analyzer", | ||
{ | ||
"preset": "conventionalcommits", | ||
"releaseRules": [ | ||
{ "type": "perf", "scope": "*", "release": "patch" }, | ||
{ "type": "chore", "scope": "*", "release": "patch" }, | ||
{ "type": "refactor", "scope": "*", "release": "patch" } | ||
] | ||
} | ||
], | ||
[ | ||
"@semantic-release/release-notes-generator", | ||
{ | ||
"preset": "conventionalcommits", | ||
"presetConfig": { | ||
"types": [ | ||
{ "type": "feat", "section": "Features" }, | ||
{ "type": "fix", "section": "Bug Fixes" }, | ||
{ "type": "perf", "section": "Performance Improvements" }, | ||
{ "type": "revert", "section": "Reverts" }, | ||
{ "type": "docs", "section": "Documentation" }, | ||
{ "type": "ci", "section": "CI/CD", "hidden": false }, | ||
{ "type": "chore", "section": "Miscellaneous Chores", "hidden": false }, | ||
{ "type": "style", "section": "Styles", "hidden": true }, | ||
{ "type": "refactor", "section": "Code Refactoring", "hidden": true }, | ||
{ "type": "test", "section": "Tests", "hidden": true }, | ||
{ "type": "build", "section": "Build System", "hidden": true } | ||
] | ||
} | ||
} | ||
], | ||
[ | ||
"@semantic-release/changelog", | ||
{ | ||
"changelogFile": "CHANGELOG.md" | ||
} | ||
], | ||
[ | ||
"@semantic-release/exec", | ||
{ | ||
"prepareCmd": "./.github/scripts/edit-version.sh ${nextRelease.version}" | ||
} | ||
], | ||
[ | ||
"@semantic-release/git", | ||
{ | ||
"assets": [ | ||
"CHANGELOG.md", | ||
"Cargo.toml", | ||
"Cargo.lock" | ||
], | ||
"message": "chore(release): ${nextRelease.version}\n\n[skip ci]" | ||
} | ||
], | ||
"@semantic-release/github", | ||
[ | ||
"@saithodev/semantic-release-backmerge", | ||
{ | ||
"backmergeBranches": [{"from": "main", "to": "develop"}], | ||
"fastForwardMode": "ff" | ||
} | ||
] | ||
] | ||
} |