Skip to content

Commit adc3131

Browse files
committed
fix(ci): use 3rd-party action to get latest tag name
1 parent c3579fb commit adc3131

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ 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+
5458
- name: Build, Test, and Export XML
5559
run: |
5660
# Run build
@@ -62,19 +66,18 @@ jobs:
6266
# Pick the targets to export as XML
6367
echo 'set list("TestCoverage.*.cls") = ""' >> export
6468
echo 'set list("TestCoverage.inc") = ""' >> export
65-
echo 'do $System.OBJ.Export(.list,"TestCoverage-${{ github.ref }}.xml","/exportversion=2017.2")' >> export
69+
echo 'do $System.OBJ.Export(.list,"TestCoverage-${{ steps.tag.outputs.tag }}.xml","/exportversion=2017.2")' >> export
6670
docker exec --interactive $instance iris session $instance -B < build && docker exec --interactive $instance iris session $instance -B < test && docker exec --interactive $instance iris session $instance -B < export
67-
ls -alR
6871
6972
- name: Create Release
7073
id: create_release
7174
uses: softprops/action-gh-release@v1
7275
env:
7376
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7477
with:
75-
files: TestCoverage-${{ github.ref }}.xml
78+
files: TestCoverage-${{ steps.tag.outputs.tag }}.xml
7679
tag_name: ${{ github.ref }}
77-
name: Release ${{ github.ref }}
80+
name: ${{ steps.tag.outputs.tag }}
7881
body: |
7982
Automated release created by [action-gh-release](https://github.com/softprops/action-gh-release).
8083
draft: false

0 commit comments

Comments
 (0)