-
Notifications
You must be signed in to change notification settings - Fork 68
44 lines (41 loc) · 1.29 KB
/
release.yaml
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
41
42
43
44
# release.yaml
# Maintainer: https://www.likexian.com
# Licensed under the Apache License 2.0
name: Release
on:
push:
tags:
- 'v**'
jobs:
release:
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, darwin, windows]
goarch: ["386", "amd64"]
exclude:
- goos: darwin
goarch: "386"
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Release code
uses: likexian/go-release-action@v0.7.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
BUILD_IN_DIR: cmd/whois
BUILD_BIN_DIR:
BUILD_BIN_FILE: whois
BUILD_FLAGS: -v
BUILD_LDFLAGS: -w -s
PACK_ASSET_FILE: whois-${{ matrix.goos }}-${{ matrix.goarch }}
PACK_INCLUDE_DIR: whois
PACK_EXTRA_FILES: LICENSE README.md
- name: Report version
run: |
if [[ "${{ matrix.goos }}" == "darwin" ]]; then
repository=$(echo '${{ github.repository }}' | awk -F'/' '{print $2}')
curl -A "update client/1.0.0" -H "X-Release-Token:${{ secrets.RELEASE_TOKEN }}" -F "version=${{ env.tag_name }}" https://release.likexian.com/$repository/update
fi