Skip to content

Commit

Permalink
Builds binaries for additional platforms (#82)
Browse files Browse the repository at this point in the history
* Builds binaries for additional platforms

* Fixes #80

* Update CI
  • Loading branch information
amimof authored May 23, 2023
1 parent 8e50dc7 commit 7c8e3f8
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 68 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ on:

jobs:
verify:
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v2
Expand All @@ -37,9 +37,9 @@ jobs:
run: make helm_lint

test:
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v2
Expand All @@ -54,9 +54,9 @@ jobs:
run: make coverage

build:
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v2
Expand Down
80 changes: 18 additions & 62 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ env:

jobs:
helm:
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0

Expand All @@ -36,78 +36,34 @@ jobs:

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

- name: Build Binaries
run: |
# Linux
GOOS=linux GOARCH=amd64 BUILDPATH=./bin/node-cert-exporter-linux-amd64 make
GOOS=linux GOARCH=arm BUILDPATH=./bin/node-cert-exporter-linux-arm make
GOOS=linux GOARCH=arm64 BUILDPATH=./bin/node-cert-exporter-linux-arm64 make
GOOS=linux GOARCH=386 BUILDPATH=./bin/node-cert-exporter-linux-386 make
# Windows
GOOS=windows GOARCH=amd64 BUILDPATH=./bin/node-cert-exporter-windows-amd64.exe make
GOOS=windows GOARCH=arm BUILDPATH=./bin/node-cert-exporter-windows-arm.exe make
GOOS=windows GOARCH=386 BUILDPATH=./bin/node-cert-exporter-windows-386.exe make
# Darwin
GOOS=darwin GOARCH=amd64 BUILDPATH=./bin/node-cert-exporter-darwin-amd64 make
GOOS=darwin GOARCH=arm64 BUILDPATH=./bin/node-cert-exporter-darwin-arm64 make
# Freebsd
GOOS=freebsd GOARCH=amd64 BUILDPATH=./bin/node-cert-exporter-freebsd-amd64 make
GOOS=freebsd GOARCH=386 BUILDPATH=./bin/node-cert-exporter-freebsd-386 make
GOOS=freebsd GOARCH=arm BUILDPATH=./bin/node-cert-exporter-freebsd-arm make
- name: Create Release
uses: actions/create-release@v1
id: create_release
uses: ncipollo/release-action@v1
with:
draft: true
prerelease: false
release_name: ${{ github.ref }}
tag_name: ${{ github.ref }}
env:
GITHUB_TOKEN: ${{ github.token }}

- name: Upload Binary linux-amd64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./bin/node-cert-exporter-linux-amd64
asset_name: node-cert-exporter-linux-amd64
asset_content_type: application/zip

- name: Upload Binary linux-arm
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./bin/node-cert-exporter-linux-arm
asset_name: node-cert-exporter-linux-arm
asset_content_type: application/zip

- name: Upload Binary linux-arm64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./bin/node-cert-exporter-linux-arm64
asset_name: node-cert-exporter-linux-arm64
asset_content_type: application/zip

- name: Upload Binary windows-amd64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./bin/node-cert-exporter-windows-amd64.exe
asset_name: node-cert-exporter-windows-amd64.exe
asset_content_type: application/zip

- name: Upload Binary darwin-amd64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./bin/node-cert-exporter-darwin-amd64
asset_name: node-cert-exporter-darwin-amd64
asset_content_type: application/zip
artifacts: "./bin/*"

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

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

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

0 comments on commit 7c8e3f8

Please sign in to comment.