41 lines
847 B
YAML
41 lines
847 B
YAML
|
|
name: Build and release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
type: string
|
|
description: 'Version'
|
|
required: true
|
|
default: 'v0'
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: [moon, amd64]
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.23'
|
|
|
|
- name: Run tests
|
|
run: task test
|
|
|
|
- name: Build
|
|
run: |
|
|
task build VERSION=${{ github.event.inputs.version }}
|
|
|
|
- uses: actions/forgejo-release@v2
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
direction: upload
|
|
tag: ${{ github.event.inputs.version }}
|
|
title: ${{ github.event.inputs.version }}
|
|
url: https://gitea.ceperka.net
|
|
release-dir: bin/
|
|
release-notes-assistant: true
|