8
8
draft_release :
9
9
name : Create draft release
10
10
runs-on : ubuntu-latest
11
-
12
11
outputs :
13
12
release_id : ${{ steps.create_draft_release.outputs.id }}
14
13
upload_url : ${{ steps.create_draft_release.outputs.upload_url }}
15
-
16
14
steps :
17
15
- name : Get version from tag
18
16
id : tag_name
19
17
run : echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
20
-
21
18
- uses : actions/checkout@v2
22
-
23
- - name : Get Changelog Entry
24
- id : changelog_reader
25
- uses : mindsers/changelog-reader-action@v2
26
- with :
27
- version : ${{ env.RELEASE_VERSION }}
28
- path : ./CHANGELOG.md
29
-
30
19
- name : Create draft release
31
20
id : create_draft_release
32
21
uses : actions/create-release@v1
@@ -38,12 +27,10 @@ jobs:
38
27
draft : true
39
28
prerelease : ${{ steps.changelog_reader.outputs.status == 'prereleased' }}
40
29
body : ${{ steps.changelog_reader.outputs.changes }}
41
-
42
30
- name : ZIP uncompiled universalJavaApplicationStub
43
31
run : |
44
32
echo "Zipping uncompiled script..."
45
33
zip --junk-paths universalJavaApplicationStub-uncompiled.zip src/universalJavaApplicationStub
46
-
47
34
- name : Upload release assets
48
35
uses : actions/upload-release-asset@v1
49
36
env :
@@ -54,38 +41,31 @@ jobs:
54
41
asset_path : ./universalJavaApplicationStub-uncompiled.zip
55
42
asset_content_type : application/zip
56
43
57
-
58
44
compile :
59
45
name : Compile the stub on ${{ matrix.os }}
60
46
needs : draft_release # we need to know the upload URL
61
47
runs-on : ${{ matrix.os }}
62
48
strategy :
63
49
matrix :
64
50
os : [ macos-10.15 ] # macos-11.0
65
-
66
51
steps :
67
52
- uses : actions/checkout@v2
68
-
69
53
- name : Set env
70
54
run : echo "RELEASE_TAG=${GITHUB_REF:10}" >> $GITHUB_ENV
71
-
72
55
- name : Install shc via HomeBrew
73
56
run : |
74
57
brew install shc
75
58
shc -h
76
-
77
59
- name : Compile universalJavaApplicationStub
78
60
run : |
79
61
echo "Running shc..."
80
62
shc -r -f src/universalJavaApplicationStub
81
-
82
63
- name : ZIP universalJavaApplicationStub binary
83
64
run : |
84
65
echo "Zipping binary..."
85
66
mv src/universalJavaApplicationStub.x universalJavaApplicationStub
86
67
rm src/universalJavaApplicationStub.x.c
87
68
zip --junk-paths universalJavaApplicationStub-${{ matrix.os }}.zip universalJavaApplicationStub
88
-
89
69
- name : Upload release assets
90
70
uses : actions/upload-release-asset@v1
91
71
env :
@@ -96,12 +76,10 @@ jobs:
96
76
asset_path : ./universalJavaApplicationStub-${{ matrix.os }}.zip
97
77
asset_content_type : application/zip
98
78
99
-
100
79
publish_release :
101
80
name : Publish drafted release
102
81
needs : [ draft_release, compile ]
103
82
runs-on : ubuntu-latest
104
-
105
83
steps :
106
84
- uses : eregon/publish-release@v1
107
85
env :
0 commit comments