77 inputs :
88 tag :
99 type : string
10- description : ' Release version tag (e.g. v1.2.3)'
10+ description : " Release version tag (e.g. v1.2.3)"
1111 required : true
1212 ref :
1313 type : string
14- description : ' Git ref from which to release'
14+ description : " Git ref from which to release"
1515 required : true
16- default : ' master'
16+ default : " master"
1717 do_build_native_images :
1818 type : boolean
19- description : ' Native Test Server'
19+ description : " Native Test Server"
2020 required : true
21- default : ' true'
21+ default : " true"
2222 do_publish_jars :
2323 type : boolean
24- description : ' Publish Java Artifacts'
24+ description : " Publish Java Artifacts"
2525 required : true
26- default : ' true'
26+ default : " true"
2727env :
2828 INPUT_REF : ${{ github.event.inputs.ref }}
2929 INPUT_TAG : ${{ github.event.inputs.tag }}
30-
30+
3131jobs :
3232 create_draft_release :
3333 name : Create Github draft release
6464 --notes-file releases/"$INPUT_TAG"
6565 env :
6666 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
67-
67+
6868 publish_java_artifacts :
6969 name : Publish Java Artifacts
7070 if : github.event.inputs.do_publish_jars == 'true'
7575 uses : actions/checkout@v3
7676 with :
7777 ref : ${{ env.INPUT_REF }}
78-
78+
7979 # Our custom gradle version sniffing builds the maven release artifact
8080 # names out of the git tag ... but the repo isn't tagged (yet) so add a
8181 # tag to the _local_ clone just to get the right jar names. This tag
@@ -84,21 +84,21 @@ jobs:
8484 # release creates the tag.
8585 - name : Temporary tag
8686 run : git tag "$INPUT_TAG"
87-
87+
8888 - name : Set up Java
8989 uses : actions/setup-java@v3
9090 with :
91- java-version : ' 11 '
92- distribution : ' temurin'
93-
91+ java-version : " 11 "
92+ distribution : " temurin"
93+
9494 - name : Set up Gradle
9595 uses : gradle/gradle-build-action@v2
9696
9797 - name : Set up signing key
9898 run : mkdir -p "$HOME/.gnupg" && echo -n "$KEY" | base64 -d > "$HOME/.gnupg/secring.gpg"
9999 env :
100100 KEY : ${{ secrets.JAR_SIGNING_KEY }}
101-
101+
102102 # Prefer env variables here rather than inline ${{ secrets.FOO }} to
103103 # decrease the likelihood that secrets end up printed to stdout.
104104 - name : Set up secret gradle properties
@@ -116,27 +116,27 @@ jobs:
116116 KEY_ID : ${{ secrets.JAR_SIGNING_KEY_ID }}
117117 RH_USER : ${{ secrets.RH_USER }}
118118 RH_PASSWORD : ${{ secrets.RH_PASSWORD }}
119-
119+
120120 - name : Publish
121121 run : ./gradlew publishToSonatype
122-
122+
123123 build_native_images :
124124 name : Build native test server
125125 needs : create_draft_release
126126 if : github.event.inputs.do_build_native_images == 'true'
127127 strategy :
128128 matrix :
129129 include :
130- - dist : ubuntu-latest
130+ - runner : buildjet-2vcpu- ubuntu-1804
131131 os_family : linux
132132 arch : amd64
133- - dist : macos-latest
133+ - runner : macos-latest
134134 os_family : macOS
135135 arch : amd64
136- - dist : windows-2019
136+ - runner : windows-2019
137137 os_family : windows
138138 arch : amd64
139- runs-on : ${{ matrix.dist }}
139+ runs-on : ${{ matrix.runner }}
140140 steps :
141141 - name : Checkout repo
142142 uses : actions/checkout@v3
@@ -147,19 +147,19 @@ jobs:
147147 # gets pushed
148148 - name : Temporary tag
149149 run : git tag "$INPUT_TAG"
150-
150+
151151 - name : Set up Java
152152 uses : actions/setup-java@v3
153153 with :
154- java-version : ' 11 '
155- distribution : ' temurin'
156-
154+ java-version : " 11 "
155+ distribution : " temurin"
156+
157157 - name : Set up Gradle
158158 uses : gradle/gradle-build-action@v2
159-
159+
160160 - name : Build native test server
161161 run : ./gradlew :temporal-test-server:build
162-
162+
163163 # path ends in a wildcard because on windows the file ends in '.exe'
164164 # path excludes *.txt because native-image also writes a build manifest txt file
165165 - name : Upload executable to workflow
@@ -171,7 +171,7 @@ jobs:
171171 !temporal-test-server/build/graal/*.txt
172172 if-no-files-found : error
173173 retention-days : 1
174-
174+
175175 attach_to_release :
176176 name : Attach native executables to release
177177 needs : build_native_images
@@ -183,21 +183,21 @@ jobs:
183183 # when no artifact is specified, all artifacts are downloaded and expanded into CWD
184184 - name : Fetch executables
185185 uses : actions/download-artifact@v3
186-
186+
187187 # example: linux_amd64/ -> temporal-test-server_1.2.3_linux_amd64
188- # the name of the directory created becomes the basename of the archive (*.tar.gz or *.zip) and
188+ # the name of the directory created becomes the basename of the archive (*.tar.gz or *.zip) and
189189 # the root directory of the contents of the archive.
190190 - name : Rename dirs
191191 run : |
192192 version="$(sed 's/^v//'<<<"$INPUT_TAG")"
193- for dir in *; do mv "$dir" "temporal-test-server_${version}_${dir}"; done
194-
193+ for dir in *; do mv "$dir" "temporal-test-server_${version}_${dir}"; done
194+
195195 - name : Tar (linux, macOS)
196196 run : for dir in *{linux,macOS}*; do tar cvzf "${dir}.tar.gz" "$dir"; done
197-
197+
198198 - name : Zip (windows)
199199 run : for dir in *windows*; do zip -r "${dir}.zip" "$dir"; done
200-
200+
201201 - name : Upload release archives
202202 uses : actions/upload-artifact@v3
203203 with :
@@ -210,10 +210,10 @@ jobs:
210210
211211 - name : Upload
212212 run : |
213- until gh release upload --clobber --repo $GITHUB_REPOSITORY "$INPUT_TAG" *.zip *.tar.gz; do
214- echo "Attempt $((++attempts)) to upload release artifacts failed. Will retry in 20s"
215- sleep 20
216- done
213+ until gh release upload --clobber --repo $GITHUB_REPOSITORY "$INPUT_TAG" *.zip *.tar.gz; do
214+ echo "Attempt $((++attempts)) to upload release artifacts failed. Will retry in 20s"
215+ sleep 20
216+ done
217217 timeout-minutes : 10
218218 env :
219219 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments