1
0
mirror of https://github.com/zu1k/nali.git synced 2025-01-23 05:39:03 +08:00
nali/.github/workflows/go.yml

40 lines
1.0 KiB
YAML
Raw Normal View History

2020-07-17 09:05:25 +08:00
name: Go
on: [push, pull_request]
jobs:
test-build:
name: Test and Build
2020-07-17 09:05:25 +08:00
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/setup-go@v3
2020-07-17 09:05:25 +08:00
with:
go-version: '^1.18'
2020-07-17 09:05:25 +08:00
- name: Check out code into the Go module directory
uses: actions/checkout@v3
2020-07-17 09:05:25 +08:00
- name: Cache go module
uses: actions/cache@v3
2020-07-17 09:05:25 +08:00
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
2020-07-17 11:49:49 +08:00
- name: Get dependencies and run test
run: |
go test ./...
2020-07-17 09:05:25 +08:00
- name: Build
run: go build
release-aur-git:
name: Release Aur Git
needs: [test-build]
runs-on: ubuntu-latest
steps:
- name: Publish AUR package
uses: guumaster/aur-publish-docker-action@master
with:
package_name: nali-go-git
commit_username: 'zu1k'
commit_email: 'i@zu1k.com'
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}