-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (33 loc) · 1.04 KB
/
main.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
name: Go
on:
push:
branches: [ "main" ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get tags
run: git fetch --tags origin
- name: Prepare git rev-describe
run: git config --global alias.rev-describe '!git describe --match "v*.*.*" --tags || git describe --match "v*.*.*" --tags || git describe --match "v*.*.*" --tags || git rev-parse --short=8 HEAD'
- name: rev-describe
run: printf "REV_DESCRIBE=%s\n" "$(git rev-describe)" | tee -a "${GITHUB_ENV}"
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
- name: Make
run: make -C cmd/gmi-upload
- name: Prepare dist dir
run: mkdir dist
- name: Copy artifacts to dist
run: cp {cmd/gmi-upload/gmi-upload-*-*,assets/gmi-putdir,init/*} dist/
- name: Upload Artifacts
uses: actions/[email protected]
with:
name: putmybills-${{ env.REV_DESCRIBE }}
path: "dist/*"