Skip to content

Commit 59997fb

Browse files
authored
Merge pull request #31 from isc-shuliu/master
Enhance Release CI
2 parents 0c2ff29 + 30d2f7d commit 59997fb

File tree

1 file changed

+7
-25
lines changed

1 file changed

+7
-25
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,18 @@
1-
name: Export XML and Release on Tag Push
1+
name: Release
22

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:
13-
# ** FOR GENERAL USE, LIKELY NEED TO CHANGE: **
14-
package: TestCoverage
1513
container_image: intersystemsdc/iris-community:latest
16-
17-
# ** FOR GENERAL USE, MAY NEED TO CHANGE: **
18-
build_flags: -dev -verbose # Load in -dev mode to get unit test code preloaded
19-
test_package: UnitTest
20-
21-
# ** FOR GENERAL USE, SHOULD NOT NEED TO CHANGE: **
2214
instance: iris
23-
# Note: test_reports value is duplicated in test_flags environment variable
2415
test_reports: test-reports
25-
test_flags: >-
26-
-verbose -DUnitTest.ManagerClass=TestCoverage.Manager -DUnitTest.JUnitOutput=/test-reports/junit.xml
27-
-DUnitTest.FailuresAreFatal=1 -DUnitTest.Manager=TestCoverage.Manager
28-
-DUnitTest.UserParam.CoverageReportClass=TestCoverage.Report.Cobertura.ReportGenerator
29-
-DUnitTest.UserParam.CoverageReportFile=/source/coverage.xml
3016

3117
steps:
3218
- name: Checkout code
@@ -51,16 +37,12 @@ jobs:
5137
# Workaround for permissions issues in TestCoverage (creating directory for source export)
5238
chmod 777 $GITHUB_WORKSPACE
5339
54-
- name: Get latest tag
55-
id: tag
56-
uses: actions-ecosystem/action-get-latest-tag@v1
57-
5840
- name: Export XML
5941
run: |
6042
# Pick the targets to export as XML
6143
echo 'set list("TestCoverage.*.cls") = ""' >> export
6244
echo 'set list("TestCoverage.inc") = ""' >> export
63-
echo 'do $System.OBJ.Export(.list,"/source/TestCoverage-${{ steps.tag.outputs.tag }}.xml","/exportversion=2017.2")' >> export
45+
echo 'do $System.OBJ.Export(.list,"/source/TestCoverage-${{ github.ref_name }}.xml","/exportversion=2017.2")' >> export
6446
docker exec --interactive $instance iris session $instance -B < export
6547
6648
- name: Create Release
@@ -69,9 +51,9 @@ jobs:
6951
env:
7052
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7153
with:
72-
files: TestCoverage-${{ steps.tag.outputs.tag }}.xml
73-
tag_name: ${{ github.ref }}
74-
name: ${{ steps.tag.outputs.tag }}
54+
files: TestCoverage-${{ github.ref_name }}.xml
55+
tag_name: ${{ github.ref_name }}
56+
name: ${{ github.ref_name }}
7557
body: |
7658
Automated release created by [action-gh-release](https://github.com/softprops/action-gh-release).
7759
draft: false

0 commit comments

Comments
 (0)