cosmium/.github/workflows/release.yml

54 lines
1.2 KiB
YAML
Raw Normal View History

2024-02-26 22:41:33 +02:00
name: goreleaser
on:
push:
tags:
- '*'
permissions:
contents: write
2024-04-06 18:55:15 +03:00
packages: write
2024-02-26 22:41:33 +02:00
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
2025-01-28 22:38:31 +02:00
2024-02-26 22:41:33 +02:00
- name: Set up Go
uses: actions/setup-go@v5
with:
2024-12-18 00:34:10 +02:00
go-version: 1.22.0
2025-01-28 22:38:31 +02:00
- name: Cross-Compile with xgo
uses: crazy-max/ghaction-xgo@v3.1.0
with:
xgo_version: latest
go_version: 1.22.0
dest: sharedlibrary_dist
pkg: sharedlibrary
prefix: cosmium
targets: linux/amd64,linux/arm64,windows/amd64,windows/arm64,darwin/amd64,darwin/arm64
v: true
buildmode: c-shared
buildvcs: true
2024-04-06 18:55:15 +03:00
- name: Docker Login
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
2025-01-28 22:38:31 +02:00
2024-02-26 22:41:33 +02:00
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: ${{ env.GITHUB_REF_NAME }}
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.PUBLISHER_TOKEN }}