Skip to content

Commit

Permalink
Update GH Actions
Browse files Browse the repository at this point in the history
Signed-off-by: Mohamed Belgaied Hassine <[email protected]>
  • Loading branch information
belgaied2 committed Apr 28, 2023
1 parent da5db4e commit a9a3285
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 23 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/gh-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Multi-Arch release

on:
release:
types: [created]

jobs:
releases-matrix:
name: Release Go Binary
runs-on: self-hosted
strategy:
matrix:
# build and publish in parallel: linux/386, linux/amd64, linux/arm64, windows/386, windows/amd64, darwin/amd64, darwin/arm64
goos: [linux, windows, darwin]
goarch: ["386", amd64, arm64]
exclude:
- goarch: "386"
goos: darwin
- goarch: arm64
goos: windows
steps:
- uses: actions/checkout@v2
- uses: wangyoucao577/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
binary_name: harvester
ldflags: -X main.VERSION=${{ github.ref_name }}
37 changes: 14 additions & 23 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,20 @@
name: Multi-Arch release
name: release

on:
release:
types: [created]
on:
push:
tags:
- "v*.*.*"

jobs:
releases-matrix:
name: Release Go Binary
release:
name: Create a GH Release
runs-on: self-hosted
strategy:
matrix:
# build and publish in parallel: linux/386, linux/amd64, linux/arm64, windows/386, windows/amd64, darwin/amd64, darwin/arm64
goos: [linux, windows, darwin]
goarch: ["386", amd64, arm64]
exclude:
- goarch: "386"
goos: darwin
- goarch: arm64
goos: windows
steps:
- uses: actions/checkout@v2
- uses: wangyoucao577/go-release-action@v1.22
- name: Release
uses: softprops/action-gh-release@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
binary_name: harvester
ldflags: -X main.VERSION=${{ github.ref_name }}
prerelease: false
draft: true
fail_on_unmatched_files: true
discussion_category_name: Announcements
name: ${{ github.ref_name }}

0 comments on commit a9a3285

Please sign in to comment.