-
Notifications
You must be signed in to change notification settings - Fork 13
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
6 changed files
with
119 additions
and
0 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,29 @@ | ||
fragment-directory: changelog.d | ||
|
||
categories: | ||
- name: π₯ Breaking Changes | ||
bump: major | ||
label: semver-major | ||
- name: π Enhancements and New Features | ||
bump: minor | ||
label: semver-minor | ||
- name: π Bug Fixes | ||
label: semver-patch | ||
- name: π© Dependencies | ||
label: semver-dependencies | ||
- name: π Documentation | ||
label: semver-documentation | ||
- name: π Internal | ||
label: semver-internal | ||
- name: π Performance | ||
label: semver-performance | ||
- name: π§ͺ Tests | ||
label: semver-tests | ||
|
||
extra-labels: | ||
- name: release | ||
color: 007f70 | ||
description: Create a release when this PR is merged | ||
- name: CHANGELOG-missing | ||
color: 5b0406 | ||
description: PR does not contain a changelog item yet |
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,34 @@ | ||
name: Add changelog.d snippet | ||
|
||
on: | ||
# This action should be run in workflows triggered by `pull_request_target` | ||
# (not by regular `pull_request`!) | ||
pull_request_target: | ||
# Run whenever the PR is pushed to, receives a label, or is created with | ||
# one or more labels: | ||
types: [synchronize, labeled] | ||
|
||
# Prevent the workflow from running multiple jobs at once when a PR is created | ||
# with multiple labels: | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.head.label }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
add: | ||
runs-on: ubuntu-latest | ||
# Only run on PRs that have the "CHANGELOG-missing" label: | ||
if: contains(github.event.pull_request.labels.*.name, 'CHANGELOG-missing') | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
repository: ${{ github.event.pull_request.head.repo.full_name }} | ||
token: ${{ secrets.RELEASER_GITHUB_TOKEN }} | ||
|
||
- name: Add changelog snippet | ||
uses: datalad/release-action/add-changelog-snippet@v1 | ||
with: | ||
token: ${{ secrets.RELEASER_GITHUB_TOKEN }} | ||
rm-labels: CHANGELOG-missing |
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,36 @@ | ||
name: Auto-release on PR merge | ||
|
||
on: | ||
# This action should be run in workflows triggered by `pull_request_target` | ||
# (not by regular `pull_request`!) | ||
pull_request_target: | ||
branches: | ||
# Create a release whenever a PR is merged into one of these branches: | ||
- master | ||
types: | ||
- closed | ||
# Allow manually triggering a release via a "Run workflow" button on the | ||
# workflow's page: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
# Only run for manual runs or merged PRs with the "release" label: | ||
if: > | ||
github.event_name == 'workflow_dispatch' | ||
|| (github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'release')) | ||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.RELEASER_GITHUB_TOKEN }} | ||
# Check out all history so that the previous release tag can be | ||
# found: | ||
fetch-depth: 0 | ||
|
||
- name: Prepare release | ||
uses: datalad/release-action/release@v1 | ||
with: | ||
token: ${{ secrets.RELEASER_GITHUB_TOKEN }} | ||
pypi-token: ${{ secrets.PYPI_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,8 @@ | ||
[scriv] | ||
fragment_directory = changelog.d | ||
entry_title_template = file: templates/entry_title.md.j2 | ||
new_fragment_template = file: templates/new_fragment.md.j2 | ||
format = md | ||
# The categories must align with the category names in | ||
# .datalad-release-action.yaml | ||
categories = π₯ Breaking Changes, π Enhancements and New Features, π Bug Fixes, π© Dependencies, π Documentation, π Internal, π Performance, π§ͺ Tests |
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 @@ | ||
{{ version if version else "VERSION" }} ({{ date.strftime('%Y-%m-%d') }}) |
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,11 @@ | ||
<!-- Uncomment the section that is right (remove the HTML comment wrapper).--> | ||
{% for cat in config.categories -%} | ||
<!-- | ||
### {{ cat }} | ||
- Describe change, possibly reference closed/related issue/PR. | ||
Fixes [#XXX](https://github.com/datalad/datalad-neuroimaging/issues/XXX) via | ||
[PR #YYY](https://github.com/datalad/datalad-neuroimaging/pull/YYY) | ||
(by [@GITHUBHANDLE](https://github.com/GITHUBHANDLE)) | ||
--> | ||
{% endfor -%} |