Skip to content

Commit 36e7bfc

Browse files
committed
Use workflow variables for tool versions in workflows
Placement of this information at the top of the file, where it is easy to find and edit, facilitates updates to the workflows as the tool versions used for project development are bumped periodically.
1 parent c8a1443 commit 36e7bfc

File tree

5 files changed

+38
-5
lines changed

5 files changed

+38
-5
lines changed

.github/workflows/check-go.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Check Go
22

3+
env:
4+
# See: https://github.com/actions/setup-go/tree/v2#readme
5+
GO_VERSION: "1.16"
6+
37
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
48
on:
59
push:
@@ -30,6 +34,11 @@ jobs:
3034
- name: Checkout repository
3135
uses: actions/checkout@v2
3236

37+
- name: Install Go
38+
uses: actions/setup-go@v2
39+
with:
40+
go-version: ${{ env.GO_VERSION }}
41+
3342
- name: Install Taskfile
3443
uses: arduino/setup-task@v1
3544
with:
@@ -46,6 +55,11 @@ jobs:
4655
- name: Checkout repository
4756
uses: actions/checkout@v2
4857

58+
- name: Install Go
59+
uses: actions/setup-go@v2
60+
with:
61+
go-version: ${{ env.GO_VERSION }}
62+
4963
- name: Install Taskfile
5064
uses: arduino/setup-task@v1
5165
with:
@@ -62,6 +76,11 @@ jobs:
6276
- name: Checkout repository
6377
uses: actions/checkout@v2
6478

79+
- name: Install Go
80+
uses: actions/setup-go@v2
81+
with:
82+
go-version: ${{ env.GO_VERSION }}
83+
6584
- name: Install Taskfile
6685
uses: arduino/setup-task@v1
6786
with:

.github/workflows/release.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Create Release
22

3+
env:
4+
# See: https://github.com/actions/setup-go/tree/v2#readme
5+
GO_VERSION: "1.14"
6+
37
on:
48
push:
59
tags:
@@ -29,7 +33,7 @@ jobs:
2933
- name: Install Go
3034
uses: actions/setup-go@v2
3135
with:
32-
go-version: "1.14"
36+
go-version: ${{ env.GO_VERSION }}
3337

3438
- name: Build project
3539
run: task go:build

.github/workflows/test-go.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Test Go
22

3+
env:
4+
# See: https://github.com/actions/setup-go/tree/v2#readme
5+
GO_VERSION: "1.14"
6+
37
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
48
on:
59
push:
@@ -30,7 +34,7 @@ jobs:
3034
- name: Install Go
3135
uses: actions/setup-go@v2
3236
with:
33-
go-version: "1.14"
37+
go-version: ${{ env.GO_VERSION }}
3438

3539
- name: Install Taskfile
3640
uses: arduino/setup-task@v1

.github/workflows/test-integration.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
name: Test Integration
22

3+
env:
4+
# See: https://github.com/actions/setup-go/tree/v2#readme
5+
GO_VERSION: "1.14"
6+
# See: https://github.com/actions/setup-python/tree/v2#available-versions-of-python
7+
PYTHON_VERSION: "3.9"
8+
39
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
410
on:
511
push:
@@ -36,12 +42,12 @@ jobs:
3642
- name: Install Go
3743
uses: actions/setup-go@v2
3844
with:
39-
go-version: "1.14"
45+
go-version: ${{ env.GO_VERSION }}
4046

4147
- name: Install Python
4248
uses: actions/setup-python@v2
4349
with:
44-
python-version: "3.9"
50+
python-version: ${{ env.PYTHON_VERSION }}
4551

4652
- name: Install Poetry
4753
run: pip install poetry

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/arduino/library-registry-submission-parser/parser
22

3-
go 1.14
3+
go 1.16
44

55
require (
66
github.com/arduino/go-paths-helper v1.6.1

0 commit comments

Comments
 (0)