-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
task: move to release-plz for release workflow (#4)
* task: Moves workflow to release-please and setup mergify and dependabot for dependency updates * chore: bump dependencies * Just use normal github token when building
- Loading branch information
Showing
8 changed files
with
203 additions
and
80 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,16 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: cargo | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
open-pull-requests-limit: 10 | ||
commit-message: | ||
prefix: "dep-update: " | ||
- package-ecosystem: github-actions | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
commit-message: | ||
prefix: "dep-update: " | ||
open-pull-requests-limit: 10 |
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,14 @@ | ||
pull_request_rules: | ||
- name: Automatic merge for Dependabot pull requests | ||
conditions: | ||
- author=dependabot[bot] | ||
actions: | ||
merge: | ||
method: squash | ||
- name: Automatic update to the main branch for pull requests | ||
conditions: | ||
- -conflict | ||
- -draft | ||
- -author=dependabot[bot] | ||
actions: | ||
update: |
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,37 @@ | ||
--- | ||
name: Continuous Deployment | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
release-plz: | ||
name: Release-plz | ||
runs-on: ubuntu-latest | ||
env: | ||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_PUBLISH_KEY }} | ||
steps: | ||
- name: Generate token | ||
id: generate-token | ||
uses: actions/create-github-app-token@v1 | ||
with: | ||
app-id: ${{ secrets.UNLEASH_BOT_APP_ID }} | ||
private-key: ${{ secrets.UNLEASH_BOT_PRIVATE_KEY }} | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ steps.generate-token.outputs.token }} | ||
- name: Install rust toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
- name: Run release-plz | ||
uses: MarcoIeni/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }} |
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,106 @@ | ||
[workspace] | ||
|
||
changelog_update = true | ||
|
||
dependencies_update = true | ||
|
||
git_tag_enable = true | ||
|
||
git_release_enable = false | ||
|
||
pr_labels = ["release"] | ||
|
||
allow_dirty = false | ||
|
||
publish_allow_dirty = false | ||
|
||
semver_check = false | ||
|
||
|
||
[changelog] | ||
|
||
commit_parsers = [ | ||
{ message = "^feat", group = "<!-- 0 -->🚀 Features" }, | ||
{ message = "^fix", group = "<!-- 1 -->🐛 Bug Fixes" }, | ||
{ message = "^doc", group = "<!-- 3 -->📚 Documentation" }, | ||
{ message = "^perf", group = "<!-- 4 -->⚡ Performance" }, | ||
{ message = "^refactor", group = "<!-- 2 -->🚜 Refactor" }, | ||
{ message = "^style", group = "<!-- 5 -->🎨 Styling" }, | ||
{ message = "^test", group = "<!-- 6 -->🧪 Testing" }, | ||
{ message = "^dep-update", group = "<!-- 11 --> Dependency updates" }, | ||
{ message = "^build\\(deps\\)", group = "<!-- 11 --> Dependency updates" }, | ||
{ message = "^chore\\(release\\): prepare for", skip = true }, | ||
{ message = "^chore\\(deps.*\\)", skip = true }, | ||
{ message = "^chore\\(pr\\)", skip = true }, | ||
{ message = "^chore\\(pull\\)", skip = true }, | ||
{ message = "^chore|^ci", group = "<!-- 7 -->⚙️ Miscellaneous Tasks" }, | ||
{ body = ".*security", group = "<!-- 8 -->🛡️ Security" }, | ||
{ message = "^revert", group = "<!-- 9 -->◀️ Revert" }, | ||
{ message = ".*", group = "<!-- 10 -->💼 Other" }, | ||
] | ||
|
||
commit_preprocessors = [ | ||
# Replace `foo` with `bar` | ||
{ pattern = "foo", replace = "bar" }, | ||
|
||
# Replace `<REPO>` in the template body with the repository URL | ||
{ pattern = '<REPO>', replace = "https://github.com/unleash/actix-middleware-etag" }, | ||
|
||
# Replace multiple spaces with a single space. | ||
{ pattern = " +", replace = " " }, | ||
|
||
# Replace the issue number with the link. | ||
{ pattern = "\\(#([0-9]+)\\)", replace = "([#${1}](https://github.com/unleash/actix-middleware-etag/issues/${1}))" }, | ||
# Remove prefix | ||
{ pattern = 'Merged PR #[0-9]: (.*)', replace = "$1" }, | ||
|
||
# Remove gitmoji from commit messages, both actual UTF emoji and :emoji: | ||
{ pattern = ' *(:\w+:|[\p{Emoji_Presentation}\p{Extended_Pictographic}\u{200D}]) *', replace = "" }, | ||
|
||
# Hyperlink PR references from merge commits. | ||
{ pattern = "Merge pull request #([0-9]+) from [^ ]+", replace = "PR # [${1}](https://github.com/unleash/actix-middleware-etag/pull/${1}):" }, | ||
|
||
# Hyperlink commit links, with short commit hash as description. | ||
{ pattern = "https://github.com/unleash/actix-middleware-etag/commit/([a-f0-9]{7})[a-f0-9]*", replace = "commit # [${1}](${0})" }, | ||
|
||
# Linear issue references | ||
{ pattern = "\\(([0-9]-[0-9]+)\\)", replace = "Linear issue: [${1}](https://linear.app/unleash/issue/${1})"}, | ||
|
||
# Hyperlink bare commit hashes like "abcd1234" in commit logs, with short commit hash as description. | ||
{ pattern = "([ \\n])(([a-f0-9]{7})[a-f0-9]*)", replace = "${1}commit # [${3}](https://github.com/unleash/actix-middleware-etag/commit/${2})" }, | ||
] | ||
|
||
body = """ | ||
## [{{ version | trim_start_matches(pat="v") }}]\ | ||
{%- if release_link -%}\ | ||
({{ release_link }})\ | ||
{% endif %} \ | ||
- {{ timestamp | date(format="%Y-%m-%d") }} | ||
{% for group, commits in commits | group_by(attribute="group") %} | ||
### {{ group | striptags | trim | upper_first }} | ||
{% for commit in commits %} | ||
{%- if commit.scope -%} | ||
- *({{commit.scope}})* {% if commit.breaking %}[**breaking**] {% endif %}\ | ||
{{ commit.message }}{{ self::username(commit=commit) }}\ | ||
{%- if commit.links %} \ | ||
({% for link in commit.links %}[{{link.text}}]({{link.href}}) {% endfor -%})\ | ||
{% endif %} | ||
{% else -%} | ||
- {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message }}{{ self::username(commit=commit) }}{{ self::pr(commit=commit) }} | ||
{% endif -%} | ||
{% endfor -%} | ||
{% endfor %} | ||
{%- if remote.contributors %} | ||
### Contributors | ||
{% for contributor in remote.contributors %} | ||
* @{{ contributor.username }} | ||
{%- endfor %} | ||
{% endif -%} | ||
{%- macro username(commit) -%} | ||
{% if commit.remote.username %} (by @{{ commit.remote.username }}){% endif -%} | ||
{% endmacro -%} | ||
{%- macro pr(commit) -%} | ||
{% if commit.remote.pr_number %} - #{{ commit.remote.pr_number }}{% endif -%} | ||
{% endmacro -%} | ||
""" |