Skip to content

Commit 7c8e3f8

Browse files
authored
Builds binaries for additional platforms (#82)
* Builds binaries for additional platforms * Fixes #80 * Update CI
1 parent 8e50dc7 commit 7c8e3f8

File tree

2 files changed

+24
-68
lines changed

2 files changed

+24
-68
lines changed

.github/workflows/go.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ on:
88

99
jobs:
1010
verify:
11-
runs-on: ubuntu-18.04
11+
runs-on: ubuntu-22.04
1212
steps:
13-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v3
1414

1515
- name: Set up Go
1616
uses: actions/setup-go@v2
@@ -37,9 +37,9 @@ jobs:
3737
run: make helm_lint
3838

3939
test:
40-
runs-on: ubuntu-18.04
40+
runs-on: ubuntu-22.04
4141
steps:
42-
- uses: actions/checkout@v2
42+
- uses: actions/checkout@v3
4343

4444
- name: Set up Go
4545
uses: actions/setup-go@v2
@@ -54,9 +54,9 @@ jobs:
5454
run: make coverage
5555

5656
build:
57-
runs-on: ubuntu-18.04
57+
runs-on: ubuntu-22.04
5858
steps:
59-
- uses: actions/checkout@v2
59+
- uses: actions/checkout@v3
6060

6161
- name: Set up Go
6262
uses: actions/setup-go@v2

.github/workflows/release.yaml

Lines changed: 18 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ env:
1313

1414
jobs:
1515
helm:
16-
runs-on: ubuntu-18.04
16+
runs-on: ubuntu-22.04
1717
steps:
18-
- uses: actions/checkout@v2
18+
- uses: actions/checkout@v3
1919
with:
2020
fetch-depth: 0
2121

@@ -36,78 +36,34 @@ jobs:
3636

3737
releases:
3838
if: startsWith(github.ref, 'refs/tags/v')
39-
runs-on: ubuntu-18.04
39+
runs-on: ubuntu-22.04
4040
steps:
41-
- uses: actions/checkout@v2
41+
- uses: actions/checkout@v3
4242

4343
- name: Build Binaries
4444
run: |
45+
# Linux
4546
GOOS=linux GOARCH=amd64 BUILDPATH=./bin/node-cert-exporter-linux-amd64 make
4647
GOOS=linux GOARCH=arm BUILDPATH=./bin/node-cert-exporter-linux-arm make
4748
GOOS=linux GOARCH=arm64 BUILDPATH=./bin/node-cert-exporter-linux-arm64 make
49+
GOOS=linux GOARCH=386 BUILDPATH=./bin/node-cert-exporter-linux-386 make
50+
# Windows
4851
GOOS=windows GOARCH=amd64 BUILDPATH=./bin/node-cert-exporter-windows-amd64.exe make
52+
GOOS=windows GOARCH=arm BUILDPATH=./bin/node-cert-exporter-windows-arm.exe make
53+
GOOS=windows GOARCH=386 BUILDPATH=./bin/node-cert-exporter-windows-386.exe make
54+
# Darwin
4955
GOOS=darwin GOARCH=amd64 BUILDPATH=./bin/node-cert-exporter-darwin-amd64 make
56+
GOOS=darwin GOARCH=arm64 BUILDPATH=./bin/node-cert-exporter-darwin-arm64 make
57+
# Freebsd
58+
GOOS=freebsd GOARCH=amd64 BUILDPATH=./bin/node-cert-exporter-freebsd-amd64 make
59+
GOOS=freebsd GOARCH=386 BUILDPATH=./bin/node-cert-exporter-freebsd-386 make
60+
GOOS=freebsd GOARCH=arm BUILDPATH=./bin/node-cert-exporter-freebsd-arm make
5061
5162
- name: Create Release
52-
uses: actions/create-release@v1
53-
id: create_release
63+
uses: ncipollo/release-action@v1
5464
with:
5565
draft: true
56-
prerelease: false
57-
release_name: ${{ github.ref }}
58-
tag_name: ${{ github.ref }}
59-
env:
60-
GITHUB_TOKEN: ${{ github.token }}
61-
62-
- name: Upload Binary linux-amd64
63-
uses: actions/upload-release-asset@v1
64-
env:
65-
GITHUB_TOKEN: ${{ github.token }}
66-
with:
67-
upload_url: ${{ steps.create_release.outputs.upload_url }}
68-
asset_path: ./bin/node-cert-exporter-linux-amd64
69-
asset_name: node-cert-exporter-linux-amd64
70-
asset_content_type: application/zip
71-
72-
- name: Upload Binary linux-arm
73-
uses: actions/upload-release-asset@v1
74-
env:
75-
GITHUB_TOKEN: ${{ github.token }}
76-
with:
77-
upload_url: ${{ steps.create_release.outputs.upload_url }}
78-
asset_path: ./bin/node-cert-exporter-linux-arm
79-
asset_name: node-cert-exporter-linux-arm
80-
asset_content_type: application/zip
81-
82-
- name: Upload Binary linux-arm64
83-
uses: actions/upload-release-asset@v1
84-
env:
85-
GITHUB_TOKEN: ${{ github.token }}
86-
with:
87-
upload_url: ${{ steps.create_release.outputs.upload_url }}
88-
asset_path: ./bin/node-cert-exporter-linux-arm64
89-
asset_name: node-cert-exporter-linux-arm64
90-
asset_content_type: application/zip
91-
92-
- name: Upload Binary windows-amd64
93-
uses: actions/upload-release-asset@v1
94-
env:
95-
GITHUB_TOKEN: ${{ github.token }}
96-
with:
97-
upload_url: ${{ steps.create_release.outputs.upload_url }}
98-
asset_path: ./bin/node-cert-exporter-windows-amd64.exe
99-
asset_name: node-cert-exporter-windows-amd64.exe
100-
asset_content_type: application/zip
101-
102-
- name: Upload Binary darwin-amd64
103-
uses: actions/upload-release-asset@v1
104-
env:
105-
GITHUB_TOKEN: ${{ github.token }}
106-
with:
107-
upload_url: ${{ steps.create_release.outputs.upload_url }}
108-
asset_path: ./bin/node-cert-exporter-darwin-amd64
109-
asset_name: node-cert-exporter-darwin-amd64
110-
asset_content_type: application/zip
66+
artifacts: "./bin/*"
11167

11268
packages:
11369
if: startsWith(github.ref, 'refs/tags/v')
@@ -118,7 +74,7 @@ jobs:
11874

11975
steps:
12076
- name: Checkout repository
121-
uses: actions/checkout@v2
77+
uses: actions/checkout@v3
12278

12379
- name: Log in to the Container registry
12480
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9

0 commit comments

Comments
 (0)