forgejo-runner/.forgejo/workflows/test.yml
2023-04-03 01:13:33 +02:00

35 lines
828 B
YAML

name: checks
on:
- pull_request
- push:
branches: [main]
env:
GOPROXY: https://goproxy.io,direct
jobs:
lint:
name: check and test
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.19
- uses: actions/checkout@v3
- name: vet checks
run: make vet
- name: build
run: make build
- name: test
run: make test
- run: |
mkdir release
mv forgejo-runner release
- if: ${{ startsWith(github.ref, 'refs/tags/v') }}
uses: https://code.forgejo.org/actions/forgejo-release@v1
with:
direction: upload
release-dir: release
release-notes: "RELEASE-NOTES#${{ github.ref_name }}"
token: ${{ secrets.TOKEN }}
verbose: true