Skip to content

Commit 0b157a1

Browse files
committed
uniform publish-go-tester-task to the assets repo:
- add macos arm64 - differentiate linux arm into linux armv6, and linux armv7 - bump version of GO to 1.17 - bump upload/artifact action from 2 to 3 - add checksum upload - remove unnecessary line continuation escaping from workflow
1 parent 31fb8a2 commit 0b157a1

File tree

1 file changed

+21
-15
lines changed

1 file changed

+21
-15
lines changed

.github/workflows/publish-go-tester-task.yml

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
11
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/publish-go-tester-task.md
22
name: Publish Tester Build
33

4-
env:
5-
# See: https://github.com/actions/setup-go/tree/v2#readme
6-
GO_VERSION: ^1.16.2
7-
# As defined by the Taskfile's DIST_DIR variable
8-
DIST_DIR: dist
9-
BUILDS_ARTIFACT: build-artifacts
10-
11-
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
4+
# See: https://docs.github.com/actions/using-workflows/events-that-trigger-workflows
125
on:
136
create:
147
push:
@@ -30,6 +23,13 @@ on:
3023
workflow_dispatch:
3124
repository_dispatch:
3225

26+
env:
27+
# See: https://github.com/actions/setup-go/tree/main#supported-version-syntax
28+
GO_VERSION: "1.17"
29+
# As defined by the Taskfile's DIST_DIR variable
30+
DIST_DIR: dist
31+
BUILDS_ARTIFACT: build-artifacts
32+
3333
jobs:
3434
run-determination:
3535
runs-on: ubuntu-latest
@@ -41,9 +41,9 @@ jobs:
4141
run: |
4242
RELEASE_BRANCH_REGEX="refs/heads/[0-9]+.[0-9]+.x"
4343
# The `create` event trigger doesn't support `branches` filters, so it's necessary to use Bash instead.
44-
if [[ \
45-
"${{ github.event_name }}" != "create" || \
46-
"${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX \
44+
if [[
45+
"${{ github.event_name }}" != "create" ||
46+
"${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX
4747
]]; then
4848
# Run the other jobs.
4949
RESULT="true"
@@ -86,7 +86,7 @@ jobs:
8686
8787
# Transfer builds to artifacts job
8888
- name: Upload combined builds artifact
89-
uses: actions/upload-artifact@v2
89+
uses: actions/upload-artifact@v3
9090
with:
9191
path: ${{ env.DIST_DIR }}
9292
name: ${{ env.BUILDS_ARTIFACT }}
@@ -99,16 +99,22 @@ jobs:
9999
strategy:
100100
matrix:
101101
artifact:
102+
- path: "*checksums.txt"
103+
name: checksums
102104
- path: "*Linux_32bit.tar.gz"
103105
name: Linux_X86-32
104106
- path: "*Linux_64bit.tar.gz"
105107
name: Linux_X86-64
106-
- path: "*Linux_ARM.tar.gz"
107-
name: Linux_ARM
108108
- path: "*Linux_ARM64.tar.gz"
109109
name: Linux_ARM64
110+
- path: "*Linux_ARMv6.tar.gz"
111+
name: Linux_ARMv6
112+
- path: "*Linux_ARMv7.tar.gz"
113+
name: Linux_ARMv7
110114
- path: "*macOS_64bit.tar.gz"
111115
name: macOS_64
116+
- path: "*macOS_ARM64.tar.gz"
117+
name: macOS_ARM64
112118
- path: "*Windows_32bit.zip"
113119
name: Windows_X86-32
114120
- path: "*Windows_64bit.zip"
@@ -122,7 +128,7 @@ jobs:
122128
path: ${{ env.BUILDS_ARTIFACT }}
123129

124130
- name: Upload individual build artifact
125-
uses: actions/upload-artifact@v2
131+
uses: actions/upload-artifact@v3
126132
with:
127133
path: ${{ env.BUILDS_ARTIFACT }}/${{ matrix.artifact.path }}
128134
name: ${{ matrix.artifact.name }}

0 commit comments

Comments
 (0)