11name : Release Build
22
33on :
4- push :
5- tags :
6- - " *.*.*"
4+ workflow_dispatch :
5+ inputs :
6+ tag :
7+ description : ' Release tag (e.g. 0.4.14)'
8+ required : true
9+ type : string
10+
11+ permissions : {}
712
813jobs :
14+ validate-tag :
15+ uses : ./.github/workflows/validate-tag.yaml
16+ with :
17+ tag : ${{ inputs.tag }}
918 release :
19+ needs : validate-tag
1020 permissions :
11- contents : write
12- runs-on : ubuntu-22.04
21+ contents : read
22+ runs-on : linux- ubuntu-latest-hardened
1323 env :
1424 LANG : C
1525 steps :
16- - uses : actions/checkout@v6
17- - name : Set up JDK 21
18- uses : actions/setup-java@v5
26+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
1927 with :
20- java-version : 21
21- distribution : ' zulu'
22- - name : Set up Node.js 24
23- uses : actions/setup-node@v6
28+ ref : ${{ inputs.tag }}
29+ - uses : ./.github/actions/setup-build
2430 with :
25- node-version : ' 24 '
31+ node : ' true '
2632 - name : Set up environment variables
2733 run : |
2834 echo "VERSION=$(cat sjsonnet/version)" >> $GITHUB_ENV
@@ -48,71 +54,26 @@ jobs:
4854 cp ./out/sjsonnet/jvm/$SCALA_VERSION/client/assembly.dest/out.jar ./release/sjsonnet-client-$VERSION.jar
4955 cp ./out/sjsonnet/jvm/$SCALA_VERSION/server/assembly.dest/out.jar ./release/sjsonnet-server-$VERSION.jar
5056 cp ./out/playground/bundle.dest/index.html ./release/sjsonnet-playground-$VERSION.html
51- - uses : actions/upload-artifact@v7
57+ - uses : actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
5258 name : Upload Artifacts
5359 with :
5460 name : sjsonnet-${{ env.VERSION }}-jvmjswasm
5561 path : release/*
5662 retention-days : 1
5763 if-no-files-found : error
58- release-native :
59- permissions :
60- contents : write
61- strategy :
62- matrix :
63- platform :
64- - name : linux-x86_64
65- os : ubuntu-22.04
66- - name : linux-arm64
67- os : ubuntu-22.04-arm
68- - name : darwin-x86_64
69- os : macos-15-intel
70- - name : darwin-arm64
71- os : macos-15
72- runs-on : ${{ matrix.platform.os }}
73- env :
74- LANG : C
75- steps :
76- - uses : actions/checkout@v6
77- - name : Set up JDK 21
78- uses : actions/setup-java@v5
79- with :
80- java-version : 21
81- distribution : ' zulu'
82- - name : Set up environment variables
83- run : |
84- echo "VERSION=$(cat sjsonnet/version)" >> $GITHUB_ENV
85- echo "SCALA_VERSION=3.3.7" >> $GITHUB_ENV
86- - name : Native Binary Build
87- run : ./mill "sjsonnet.native[$SCALA_VERSION].nativeLink"
88- - name : GraalVM Binary Build
89- run : ./mill "sjsonnet.graal.nativeImage"
90- - name : Rename Artifacts
91- run : |
92- mkdir release
93- cp ./out/sjsonnet/native/$SCALA_VERSION/nativeLink.dest/out ./release/sjsonnet-$VERSION-${{ matrix.platform.name }}
94- cp ./out/sjsonnet/graal/nativeImage.dest/native-executable ./release/sjsonnet-graalvm-$VERSION-${{ matrix.platform.name }}
95- - uses : actions/upload-artifact@v7
96- name : Upload Native Binary
97- with :
98- name : sjsonnet-${{ env.VERSION }}-${{ matrix.platform.name }}
99- path : release/*
100- retention-days : 1
101- if-no-files-found : error
10264 create-release-package :
10365 permissions :
104- contents : write
66+ contents : read
10567 needs :
10668 - release
107- - release-native
108- runs-on : ubuntu-22.04
69+ runs-on : linux-ubuntu-latest-hardened
10970 steps :
110- - uses : actions/checkout@v6
71+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
11172 - name : Set up environment variables
11273 run : |
11374 echo "VERSION=$(cat sjsonnet/version)" >> $GITHUB_ENV
11475 mkdir -p release
115- - uses : actions/download-artifact@v8
76+ - uses : actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
11677 name : Download Artifacts
11778 with :
11879 path : release
12384 ls -la
12485 sha256sum sjsonnet-* > sums.sha256
12586 popd
126- - uses : actions/upload-artifact@v7
87+ - uses : actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
12788 name : Upload Package
12889 with :
12990 name : sjsonnet-${{ env.VERSION }}-release
0 commit comments