1
0
mirror of https://github.com/zu1k/nali.git synced 2025-02-03 10:52:41 +08:00
nali/.github/workflows/go.yml
zu1k f2e1d3b6c4
fix: trust dir before start aur docker
Signed-off-by: zu1k <i@zu1k.com>
2022-06-30 17:38:56 +08:00

46 lines
1.2 KiB
YAML

name: Go
on: [push, pull_request]
jobs:
test-build:
name: Test and Build
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: '^1.18'
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Cache go module
uses: actions/cache@v3
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
run: go build
release-aur-git:
name: Release Aur Git
needs: [test-build]
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: git config trust dir
run: git config --global --add safe.directory /github/workspace
- name: Publish AUR package nali-go-git
uses: zu1k/aur-publish-action@master
with:
package_name: nali-go-git
commit_username: 'zu1k'
commit_email: 'i@zu1k.com'
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}