Skip to content
This repository was archived by the owner on May 1, 2025. It is now read-only.

Commit d25efcd

Browse files
author
Jason Meridth
authored
Merge pull request #61 from github/jm-specific-labels-for-releases
feat: release on specific labels
2 parents f7405ec + 89564ac commit d25efcd

4 files changed

Lines changed: 19 additions & 5 deletions

File tree

.github/release-drafter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ version-resolver:
3535
minor:
3636
labels:
3737
- 'enhancement'
38+
- 'fix'
3839
patch:
3940
labels:
40-
- 'fix'
4141
- 'documentation'
4242
- 'maintenance'
4343
default: patch

.github/workflows/release.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33

44
on:
55
workflow_dispatch:
6-
push:
6+
pull_request:
7+
types:
8+
- closed
79
branches:
810
- main
911

@@ -12,6 +14,16 @@
1214

1315
jobs:
1416
create_release:
17+
# release if
18+
# manual deployment OR
19+
# merged to main and labelled with release labels
20+
if: |
21+
(github.event_name == 'workflow_dispatch') ||
22+
(github.event.pull_request.merged == true &&
23+
(contains(github.event.pull_request.labels.*.name, 'breaking') ||
24+
contains(github.event.pull_request.labels.*.name, 'enhancement') ||
25+
contains(github.event.pull_request.labels.*.name, 'vuln') ||
26+
contains(github.event.pull_request.labels.*.name, 'release')))
1527
outputs:
1628
full-tag: ${{ steps.release-drafter.outputs.tag_name }}
1729
short-tag: ${{ steps.get_tag_name.outputs.SHORT_TAG }}

CONTRIBUTING.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,6 @@ We are using [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.
7878

7979
## Releases
8080

81-
Releases are automated but if you need to manually initiate a release you can do so through the GitHub Actions UI. If you have permissions to do so, you can navigate to the [Actions tab](https://github.com/github/automatic-contrib-prs/actions/workflows/release.yml) and select the `Run workflow` button. This will allow you to select the branch to release from and the version to release.
81+
Releases are automated if a pull request is labelled with our [SemVer related labels](.github/release-drafter.yml) or with the `vuln` or `release` labels.
82+
83+
You can also manually initiate a release you can do so through the GitHub Actions UI. If you have permissions to do so, you can navigate to the [Actions tab](https://github.com/github/automatic-contrib-prs/actions/workflows/release.yml) and select the `Run workflow` button. This will allow you to select the branch to release from and the version to release.

requirements-test.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
black==24.4.1
1+
black==24.4.2
22
flake8==7.0.0
33
mypy==1.10.0
44
mypy-extensions==1.0.0
55
pylint==3.1.0
6-
pytest==8.1.1
6+
pytest==8.2.0
77
pytest-cov==5.0.0
88
types-requests==2.31.0.20240406

0 commit comments

Comments
 (0)