-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (36 loc) · 1.22 KB
/
build.yml
File metadata and controls
36 lines (36 loc) · 1.22 KB
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
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
name: GO gitfolder download tool
jobs:
build:
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
include:
- os: windows-latest
file: gitfolder.exe
- os: ubuntu-latest
file: gitfolder_linux
- os: macos-latest
file: gitfolder_macos
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: "1.20.5"
cache-dependency-path: go.sum
- name: Build
run: go build -v -ldflags "-s -w" -o bin/${{ matrix.file }} .
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: bin/${{ matrix.file }}
name: gitfolder-${{github.ref_name}}
env:
GITHUB_TOKEN: ${{ secrets.MYTOKEN }}