2025-03-12 23:39:21 +01:00
|
|
|
---
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
2025-03-13 00:51:30 +01:00
|
|
|
#fmt:
|
|
|
|
# runs-on: 'self-hosted'
|
|
|
|
# steps:
|
|
|
|
# - uses: 'actions/checkout@v4'
|
|
|
|
# - uses: 'actions/setup-go@v5'
|
|
|
|
# with:
|
|
|
|
# go-version-file: 'go.mod'
|
|
|
|
# - run: |
|
|
|
|
# make tidy no-dirty
|
|
|
|
#test:
|
|
|
|
# runs-on: 'self-hosted'
|
|
|
|
# steps:
|
|
|
|
# - uses: 'actions/checkout@v4'
|
|
|
|
# - uses: 'actions/setup-go@v5'
|
|
|
|
# with:
|
|
|
|
# go-version-file: 'go.mod'
|
|
|
|
# - run: |
|
|
|
|
# make check tidy no-dirty
|
|
|
|
build:
|
|
|
|
#if: "${{ startsWith(github.ref, 'refs/tags/') }}"
|
|
|
|
#needs:
|
|
|
|
# - 'fmt'
|
|
|
|
# - 'test'
|
2025-03-12 23:39:21 +01:00
|
|
|
runs-on: 'self-hosted'
|
|
|
|
steps:
|
|
|
|
- uses: 'actions/checkout@v4'
|
|
|
|
- uses: 'actions/setup-go@v5'
|
|
|
|
with:
|
|
|
|
go-version-file: 'go.mod'
|
2025-03-13 00:51:30 +01:00
|
|
|
- name: 'build'
|
|
|
|
run: |
|
|
|
|
printf '%s' "$GIT_CRYPT_SECRET" | base64 -d > secret
|
|
|
|
git-crypt unlock secret
|
|
|
|
make build
|
|
|
|
env:
|
|
|
|
GIT_CRYPT_SECRET: '${{ secrets.GIT_CRYPT }}'
|
|
|
|
- uses: 'actions/upload-artifact@v3'
|
|
|
|
with:
|
|
|
|
if-no-files-found: 'error'
|
|
|
|
name: 'ods'
|
|
|
|
path: 'ods'
|
|
|
|
release:
|
|
|
|
needs:
|
|
|
|
- 'build'
|
2025-03-12 23:39:21 +01:00
|
|
|
runs-on: 'self-hosted'
|
|
|
|
steps:
|
2025-03-13 00:51:30 +01:00
|
|
|
- uses: 'actions/download-artifact@v3'
|
2025-03-12 23:39:21 +01:00
|
|
|
with:
|
2025-03-13 00:51:30 +01:00
|
|
|
name: 'ods'
|
|
|
|
- uses: 'actions/forgejo-release@v2'
|
|
|
|
with:
|
|
|
|
url: 'https://git.adyxax.org/'
|
|
|
|
repo: 'adyxax/ods'
|
|
|
|
direction: 'upload'
|
|
|
|
tag: '${{ github.ref_name }}'
|
|
|
|
sha: '${{ github.sha }}'
|
|
|
|
release-dir: 'release'
|
|
|
|
token: '${{ secrets.TOKEN }}'
|
|
|
|
hide-archive-link: true
|
|
|
|
release-notes-assistant: true
|