Skip to content

Commit 414fdbf

Browse files
committed
fix(ci): use pushed tag instead of the latest tag for release
1 parent 0c2ff29 commit 414fdbf

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ name: Export XML and Release on Tag Push
33
on:
44
push:
55
tags:
6-
- '*'
6+
- 'v[0-9]+.[0-9]+.[0-9]+' # force semantic versioning
77

88
jobs:
9-
build:
9+
build-and-release:
1010
runs-on: ubuntu-latest
1111

1212
env:
@@ -51,16 +51,12 @@ jobs:
5151
# Workaround for permissions issues in TestCoverage (creating directory for source export)
5252
chmod 777 $GITHUB_WORKSPACE
5353
54-
- name: Get latest tag
55-
id: tag
56-
uses: actions-ecosystem/action-get-latest-tag@v1
57-
5854
- name: Export XML
5955
run: |
6056
# Pick the targets to export as XML
6157
echo 'set list("TestCoverage.*.cls") = ""' >> export
6258
echo 'set list("TestCoverage.inc") = ""' >> export
63-
echo 'do $System.OBJ.Export(.list,"/source/TestCoverage-${{ steps.tag.outputs.tag }}.xml","/exportversion=2017.2")' >> export
59+
echo 'do $System.OBJ.Export(.list,"/source/TestCoverage-${{ github.ref_name }}.xml","/exportversion=2017.2")' >> export
6460
docker exec --interactive $instance iris session $instance -B < export
6561
6662
- name: Create Release
@@ -69,9 +65,9 @@ jobs:
6965
env:
7066
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7167
with:
72-
files: TestCoverage-${{ steps.tag.outputs.tag }}.xml
73-
tag_name: ${{ github.ref }}
74-
name: ${{ steps.tag.outputs.tag }}
68+
files: TestCoverage-${{ github.ref_name }}.xml
69+
tag_name: ${{ github.ref_name }}
70+
name: ${{ github.ref_name }}
7571
body: |
7672
Automated release created by [action-gh-release](https://github.com/softprops/action-gh-release).
7773
draft: false

0 commit comments

Comments
 (0)