-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (34 loc) · 1.17 KB
/
releases.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Release
on:
push:
tags:
- "v*"
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get version
id: get_version
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_OUTPUT
- name: Build
uses: crazy-max/ghaction-xgo@v3
with:
xgo_version: latest
go_version: 1.21
dest: build
targets: linux/arm64,linux/amd64,windows/amd64,darwin/amd64,darwin/arm64
v: false
x: false
race: false
ldflags: -s -w
buildmode: default
trimpath: true
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "v${{ steps.get_version.outputs.VERSION }}"
title: "Version ${{ steps.get_version.outputs.VERSION }}"
prerelease: false
files: |
build/github.com/zijiren233/*