Skip to content

Commit

Permalink
Add manual triggering support/documentation for release workflow
Browse files Browse the repository at this point in the history
Ref: datalad/release-action#51 for more info
  • Loading branch information
yarikoptic committed Jan 31, 2024
1 parent 08315c1 commit ac778d5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,17 @@ on:
- maint
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 merged PRs with the "release" label:
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'release')
# 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
Expand Down
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,8 @@ changelog based on the pull requests since the last release, commits the
results, tags the new commit with the next version number, and creates a GitHub
release for the tag.
This in turn triggers a job for building an sdist & wheel for the project and uploading them to PyPI.
The release workflow alternatively could be triggered by visiting [release workflow page](https://github.com/datalad/datalad/actions/workflows/release.yml) and pressing "Run workflow" and choosing corresponding (`maint`) branch to release.
Note that release workflow would fail if there were no commits since the most recent tagged release.

### CHANGELOG entries and labelling pull requests

Expand Down

0 comments on commit ac778d5

Please sign in to comment.