-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refs: #340
- Loading branch information
Showing
6 changed files
with
187 additions
and
9 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,7 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
# Check for updates every Monday | ||
schedule: | ||
interval: "weekly" |
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,64 @@ | ||
name: Release-plz | ||
|
||
permissions: | ||
pull-requests: write | ||
contents: write | ||
|
||
on: | ||
workflow_run: | ||
workflows: ["Build and Lint"] | ||
branches: ["master"] | ||
types: | ||
- completed | ||
|
||
jobs: | ||
release-plz-release: | ||
name: Release-plz release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Generate GitHub token | ||
uses: actions/create-github-app-token@v1 | ||
id: generate-token | ||
with: | ||
app-id: ${{ secrets.APP_ID }} | ||
private-key: ${{ secrets.APP_PRIVATE_KEY }} | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install Rust toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
- name: Run release-plz | ||
uses: release-plz/[email protected] | ||
with: | ||
command: release | ||
env: | ||
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }} | ||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | ||
|
||
release-plz-pr: | ||
name: Release-plz PR | ||
runs-on: ubuntu-latest | ||
concurrency: | ||
group: release-plz-${{ github.ref }} | ||
cancel-in-progress: false | ||
steps: | ||
- name: Generate GitHub token | ||
uses: actions/create-github-app-token@v1 | ||
id: generate-token | ||
with: | ||
app-id: ${{ secrets.APP_ID }} | ||
private-key: ${{ secrets.APP_PRIVATE_KEY }} | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install Rust toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
- name: Run release-plz | ||
uses: release-plz/[email protected] | ||
with: | ||
command: release-pr | ||
env: | ||
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }} | ||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} |
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,50 @@ | ||
[workspace] | ||
git_release_body = """ | ||
{{ changelog }} | ||
{% if remote.contributors %} | ||
### Thanks to the contributors for this release: | ||
{% for contributor in remote.contributors %} | ||
* @{{ contributor.username }} | ||
{% endfor %} | ||
{% endif %} | ||
""" | ||
|
||
[changelog] | ||
header = "# Changelog" | ||
body = """ | ||
{%- macro username(commit) -%} | ||
{% if commit.remote.username %} (by @{{ commit.remote.username }}){% endif -%} | ||
{% endmacro -%} | ||
{% macro commit_message(commit) %} | ||
- {% if commit.scope %}*({{ commit.scope }})* {% endif %}\ | ||
{% if commit.breaking %}[**breaking**] {% endif %}\ | ||
{{ commit.message | upper_first }}\ | ||
{{ self::username(commit=commit) }} \ | ||
{%- if commit.links %} \ | ||
{% for link in commit.links | unique(attribute="href") %}\ | ||
[[{{link.text}}]({{link.href}})] \ | ||
{% endfor %}\ | ||
{% endif %} | ||
{%- if commit.breaking and commit.breaking_description and not commit.breaking_description == commit.message%} | ||
> {{ commit.breaking_description -}} | ||
{% endif -%} | ||
{% endmacro %} | ||
## [{{ 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 | upper_first -}} | ||
{% for commit in commits | ||
| filter(attribute="scope") | ||
| sort(attribute="scope") -%} | ||
{{- self::commit_message(commit=commit) -}} | ||
{% endfor -%} | ||
{%- for commit in commits -%} | ||
{% if not commit.scope -%} | ||
{{- self::commit_message(commit=commit) -}} | ||
{% endif -%} | ||
{% endfor -%} | ||
{% endfor %} | ||
""" | ||
link_parsers = [ | ||
{ pattern = "#(\\d+)", href = "https://github.com/davidcole1340/ext-php-rs/issues/$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