forked from kubegems/modelx
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (37 loc) · 994 Bytes
/
assets.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
name: Assets
on:
workflow_dispatch:
push:
branches:
- 'release-*'
tags:
- 'v*.*.*'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- id: git-branch
run: |
echo "git-branch=$(echo ${GITHUB_REF##*/} | tr '[A-Z]' '[a-z]')" >> "$GITHUB_OUTPUT"
- name: Import environment variables from file
run: cat ".github/env" >> $GITHUB_ENV
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: '${{ env.golang-version }}'
check-latest: true
# Build binary
- name: Build
run: make build-assets
env:
PUSH: ${{ github.event_name != 'pull_request' }}
- name: Release
# https://github.com/softprops/action-gh-release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: bin/*