2024-12-08 11:22:35 +00:00
|
|
|
|
|
|
|
name: Build and release
|
|
|
|
|
|
|
|
on:
|
2024-12-08 16:30:36 +00:00
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
|
|
|
version:
|
2024-12-08 16:32:58 +00:00
|
|
|
type: string
|
2024-12-08 16:30:36 +00:00
|
|
|
description: 'Version'
|
|
|
|
required: true
|
|
|
|
default: 'v0'
|
2024-12-08 11:22:35 +00:00
|
|
|
|
|
|
|
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: Install dependencies
|
|
|
|
# run: |
|
|
|
|
# sudo apt-get update
|
|
|
|
# sudo apt-get install -y task
|
|
|
|
|
|
|
|
- name: Run tests
|
|
|
|
run: task test
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: |
|
2024-12-08 16:31:23 +00:00
|
|
|
task build VERSION=${{ github.event.inputs.version }}
|
2024-12-08 11:22:35 +00:00
|
|
|
|
2024-12-08 16:30:36 +00:00
|
|
|
# - name: Upload Release Asset
|
|
|
|
# uses: actions/upload-release-asset@v1
|
|
|
|
# env:
|
|
|
|
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
# with:
|
|
|
|
# upload_url: ${{ github.event.release.upload_url }}
|
|
|
|
# asset_path: ./lobby2-${{ github.ref_name }}-amd64
|
|
|
|
# asset_name: lobby2-${{ github.ref_name }}-amd64
|
|
|
|
# asset_content_type: application/octet-stream
|
|
|
|
|
|
|
|
- uses: actions/forgejo-release@v2
|
2024-12-08 11:22:35 +00:00
|
|
|
with:
|
2024-12-08 16:30:36 +00:00
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
direction: upload
|
2024-12-08 16:48:33 +00:00
|
|
|
# tag: ${{ github.event.inputs.version }}
|
2024-12-08 16:30:36 +00:00
|
|
|
url: https://gitea.ceperka.net
|
|
|
|
release-dir: bin/
|
|
|
|
release-notes-assistant: true
|