2023-02-28 23:07:43 +00:00
|
|
|
name: checks
|
|
|
|
on:
|
|
|
|
- pull_request
|
2023-04-02 20:04:08 +01:00
|
|
|
- push:
|
|
|
|
branches: [main]
|
2023-02-28 23:07:43 +00:00
|
|
|
|
|
|
|
env:
|
|
|
|
GOPROXY: https://goproxy.io,direct
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
lint:
|
|
|
|
name: check and test
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/setup-go@v3
|
|
|
|
with:
|
2023-03-23 06:12:43 +00:00
|
|
|
go-version: 1.19
|
2023-02-28 23:07:43 +00:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: vet checks
|
|
|
|
run: make vet
|
|
|
|
- name: build
|
|
|
|
run: make build
|
|
|
|
- name: test
|
2023-03-23 06:12:43 +00:00
|
|
|
run: make test
|
2023-03-30 13:25:58 +01:00
|
|
|
- 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
|