Skip to content

feat(nvidia/error-xid-sxid): new component based on persistent xid, s… #45

feat(nvidia/error-xid-sxid): new component based on persistent xid, s…

feat(nvidia/error-xid-sxid): new component based on persistent xid, s… #45

Workflow file for this run

name: goreleaser
# ref. https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
on:
push:
tags:
- "*"
permissions:
contents: write
jobs:
release:
# https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategymatrix
strategy:
matrix:
job:
# use ubuntu20.04 as default one, for backward compatibility
- os: ubuntu-20.04
platform: linux
target: linux_amd64
- os: ubuntu-20.04
platform: linux
target: linux_amd64
goreleaser_suffix: _ubuntu20.04
- os: ubuntu-22.04
platform: linux
target: linux_amd64
goreleaser_suffix: _ubuntu22.04
- os: ubuntu-24.04
platform: linux
target: linux_amd64
goreleaser_suffix: _ubuntu24.04
- os: macos-latest
platform: darwin
target: darwin_amd64
- os: macos-latest
platform: darwin
target: darwin_arm64
name: Release ${{ matrix.job.target }} (${{ matrix.job.os }})
runs-on: ${{ matrix.job.os }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install OS dependencies
shell: bash
run: |
case ${{ matrix.job.target }} in
linux_arm64) sudo apt-get -y update ; sudo apt-get -y install gcc-aarch64-linux-gnu ;;
esac
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Show version information
shell: bash
run: |
gcc --version || true
go version
# https://github.com/goreleaser/goreleaser-action
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: latest
args: release --config .goreleaser_${{ matrix.job.target }}${{ matrix.job.goreleaser_suffix }}.yaml
workdir: .
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Get tag version
if: startsWith(github.ref, 'refs/tags/')
id: get_tag_version
run: echo TAG_VERSION=${GITHUB_REF/refs\/tags\//} >> $GITHUB_OUTPUT
- name: Release latest
uses: softprops/action-gh-release@v1
if: ${{ github.ref == 'refs/heads/main' }}
with:
name: Latest release
tag_name: latest
draft: false
prerelease: false
body: Latest builds from the last commit
files: |
./dist/gpud_v${{steps.get_tag_version.outputs.TAG_VERSION}}_${{ matrix.job.target }}${{ matrix.job.goreleaser_suffix }}.tgz