mirror of
https://github.com/pikami/cosmium.git
synced 2025-02-13 19:36:49 +00:00
54 lines
1.2 KiB
YAML
54 lines
1.2 KiB
YAML
name: goreleaser
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- '*'
|
|
|
|
permissions:
|
|
contents: write
|
|
packages: write
|
|
|
|
jobs:
|
|
goreleaser:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: 1.22.0
|
|
|
|
- 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
|
|
|
|
- name: Docker Login
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- 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 }}
|