mirror of
https://github.com/zu1k/nali.git
synced 2025-01-22 21:29:02 +08:00
833763e385
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2.2.3 to 2.2.4. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v2.2.3...v2.2.4) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
51 lines
1.2 KiB
YAML
51 lines
1.2 KiB
YAML
name: Go
|
|
on: [push, pull_request]
|
|
jobs:
|
|
|
|
build:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: 1.14.x
|
|
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v2.3.4
|
|
|
|
- name: Cache go module
|
|
uses: actions/cache@v2.1.6
|
|
with:
|
|
path: ~/go/pkg/mod
|
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-go-
|
|
|
|
- name: Get dependencies and run test
|
|
run: |
|
|
go test ./...
|
|
|
|
- name: Build
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
env:
|
|
NAME: nali
|
|
BINDIR: bin
|
|
run: make -j releases
|
|
|
|
- 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
|
|
|
|
- uses: actions/upload-artifact@v2.2.4
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
with:
|
|
name: build
|
|
path: bin
|