Skip to content

Commit c605437

Browse files
authored
Review the release tag process (#105)
1 parent a7923a3 commit c605437

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

.github/workflows/release-tag.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ on:
2222

2323
jobs:
2424
push:
25-
if: "github.event.pull_request.merged == true"
25+
if: ${{ github.event.pull_request.merged == true }} and ${{ contains(github.event.pull_request.labels.*.name, 'ok-to-tag') }}
2626
runs-on: ubuntu-latest
2727
permissions:
2828
contents: write
@@ -34,24 +34,20 @@ jobs:
3434
with:
3535
ref: ${{ inputs.branch_name }}
3636
token: ${{ secrets.gh_token }}
37-
if: "contains(github.event.pull_request.labels.*.name, 'ok-to-tag')"
3837

3938
- name: setup python
4039
uses: actions/setup-python@v4
4140
with:
4241
python-version: "3.9"
43-
if: "contains(github.event.pull_request.labels.*.name, 'ok-to-tag')"
4442

4543
- name: install python libraries
4644
run: pip3 install yq pygithub
4745
shell: bash
48-
if: "contains(github.event.pull_request.labels.*.name, 'ok-to-tag')"
4946

5047
- name: extract tag name from 'galaxy.yml'
5148
id: read-tag
5249
run: echo "release_tag=$(yq -r '.version' 'galaxy.yml')" >> $GITHUB_OUTPUT
5350
shell: bash
54-
if: "contains(github.event.pull_request.labels.*.name, 'ok-to-tag')"
5551

5652
- name: create and push tag to Github repository
5753
id: push-tag
@@ -82,4 +78,4 @@ jobs:
8278
python3 ./create_github_release.py --repository ${{ github.repository }} --release-tag ${{ steps.read-tag.outputs.release_tag }} --release-name "${{ inputs.release_prefix }} ${{ steps.read-tag.outputs.release_tag }}"
8379
env:
8480
GITHUB_TOKEN: ${{ secrets.gh_token }}
85-
if: ${{ (inputs.release_publish) && contains(github.event.pull_request.labels.*.name, 'ok-to-tag') }}
81+
if: ${{ inputs.release_publish }}

0 commit comments

Comments
 (0)