chore(ci): Add builds for arm64 and darwin #14
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: | |
push: | |
branches: | |
- master | |
- release-* | |
tags: | |
- "*" | |
pull_request: {} | |
workflow_dispatch: {} | |
permissions: | |
contents: write | |
# packages: write | |
# issues: write | |
env: | |
GO_VERSION: '1.21.6' | |
GOLANGCI_VERSION: 'v1.55.2' | |
GORELEASER_VERSION: 'v1.23.0' | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v5 | |
with: | |
distribution: goreleaser | |
version: ${{ env.GORELEASER_VERSION }} | |
args: build --clean --snapshot | |
- name: Publish artifacts to Github | |
uses: actions/upload-artifact@v4 | |
if: ${{ ! startsWith(github.ref, 'refs/tags/') }} | |
with: | |
name: dist | |
path: dist | |
release: | |
needs: | |
- lint | |
runs-on: ubuntu-latest | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v5 | |
with: | |
distribution: goreleaser | |
version: ${{ env.GORELEASER_VERSION }} | |
args: release --clean | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish artifacts to Github | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dist | |
path: dist | |
lint: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Lint | |
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3 | |
with: | |
version: ${{ env.GOLANGCI_VERSION }} |