File tree Expand file tree Collapse file tree 2 files changed +13
-33
lines changed Expand file tree Collapse file tree 2 files changed +13
-33
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -3,18 +3,25 @@ name: Release Python package with pontos
3
3
on :
4
4
pull_request :
5
5
types : [closed]
6
+ workflow_dispatch :
6
7
7
8
jobs :
8
9
build-and-release :
9
- name : Build and release with pontos
10
- # If the label 'make release' is set. If PR is closed because of an merge
11
- if : contains( github.event.pull_request.labels.*.name, 'make release') && github.event.pull_request.merged == true
10
+ name : Create a new release with pontos
11
+ # If the event is a workflow_dispatch or the label 'make release' is set and PR is closed because of a merge
12
+ if : (github.event_name == 'workflow_dispatch') || ( contains( github.event.pull_request.labels.*.name, 'make release') && github.event.pull_request.merged == true)
12
13
runs-on : " ubuntu-latest"
13
14
steps :
15
+ - name : Setting the Reference
16
+ run : |
17
+ if [[ "${{ github.event_name }}" = "workflow_dispatch" ]]; then
18
+ echo "RELEASE_REF=${{ github.ref_name }}" >> $GITHUB_ENV
19
+ else
20
+ echo "RELEASE_REF=${{ github.base_ref }}" >> $GITHUB_ENV
21
+ fi
14
22
- name : Release with release action
15
- uses : greenbone/actions/release-python @v2
23
+ uses : greenbone/actions/release@v2
16
24
with :
17
- version : " 3.10"
18
25
conventional-commits : true
19
26
github-user : ${{ secrets.GREENBONE_BOT }}
20
27
github-user-mail : ${{ secrets.GREENBONE_BOT_MAIL }}
23
30
gpg-fingerprint : ${{ secrets.GPG_FINGERPRINT }}
24
31
gpg-passphrase : ${{ secrets.GPG_PASSPHRASE }}
25
32
strategy : calendar
33
+ ref : ${{ env.RELEASE_REF }}
You can’t perform that action at this time.
0 commit comments