34 lines
693 B
YAML
34 lines
693 B
YAML
name: Build and Publish
|
|
|
|
on:
|
|
release:
|
|
types: [created]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: go.mod
|
|
|
|
- name: Run tests
|
|
run: go test ./...
|
|
|
|
- name: Build binary
|
|
run: |
|
|
mkdir -p dist
|
|
go build -v -o dist/samba-configer .
|
|
|
|
- name: Create/Update Release and Upload Artifacts
|
|
uses: actions/release-action@v2 # Use Gitea's release action
|
|
with:
|
|
tag_name: ${{ gitea.ref_name }}
|
|
files: |
|
|
dist/samba-configer
|