mirror of
https://github.com/zu1k/nali.git
synced 2025-01-23 05:39:03 +08:00
45 lines
1004 B
YAML
45 lines
1004 B
YAML
|
name: Go
|
||
|
on: [push, pull_request]
|
||
|
jobs:
|
||
|
|
||
|
build:
|
||
|
name: Build
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- name: Setup Go
|
||
|
uses: actions/setup-go@v1
|
||
|
with:
|
||
|
go-version: 1.14
|
||
|
|
||
|
- name: Check out code into the Go module directory
|
||
|
uses: actions/checkout@v1
|
||
|
|
||
|
- name: Cache go module
|
||
|
uses: actions/cache@v1
|
||
|
with:
|
||
|
path: ~/go/pkg/mod
|
||
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||
|
restore-keys: |
|
||
|
${{ runner.os }}-go-
|
||
|
|
||
|
- name: Build
|
||
|
env:
|
||
|
NAME: nali
|
||
|
BINDIR: bin
|
||
|
run: make -j releases
|
||
|
|
||
|
- uses: actions/upload-artifact@v1
|
||
|
with:
|
||
|
name: build
|
||
|
path: bin
|
||
|
|
||
|
- name: Upload Release
|
||
|
uses: softprops/action-gh-release@v1
|
||
|
if: startsWith(github.ref, 'refs/tags/')
|
||
|
env:
|
||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||
|
with:
|
||
|
files: bin/*
|
||
|
draft: true
|
||
|
prerelease: true
|