-
Notifications
You must be signed in to change notification settings - Fork 8
60 lines (52 loc) · 2.18 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+' # force semantic versioning
jobs:
build-and-release:
runs-on: ubuntu-latest
env:
container_image: intersystemsdc/iris-community:latest
instance: iris
test_reports: test-reports
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run Container
run: |
# Create test_reports directory to share test results before running container
mkdir $test_reports
chmod 777 $test_reports
# Run InterSystems IRIS instance
docker pull $container_image
docker run -d -h $instance --name $instance -v $GITHUB_WORKSPACE:/source -v $GITHUB_WORKSPACE/$test_reports:/$test_reports --init $container_image
echo halt > wait
# Wait for instance to be ready
until docker exec --interactive $instance iris session $instance < wait; do sleep 1; done
- name: Install TestCoverage
run: |
echo "zpm \"install testcoverage\":1:1" > install-testcoverage
docker exec --interactive $instance iris session $instance -B < install-testcoverage
# Workaround for permissions issues in TestCoverage (creating directory for source export)
chmod 777 $GITHUB_WORKSPACE
- name: Export XML
run: |
# Pick the targets to export as XML
echo 'set list("TestCoverage.*.cls") = ""' >> export
echo 'set list("TestCoverage.inc") = ""' >> export
echo 'do $System.OBJ.Export(.list,"/source/TestCoverage-${{ github.ref_name }}.xml","/exportversion=2017.2")' >> export
docker exec --interactive $instance iris session $instance -B < export
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: TestCoverage-${{ github.ref_name }}.xml
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
body: |
Automated release created by [action-gh-release](https://github.com/softprops/action-gh-release).
draft: false
prerelease: false