chore(tooling): add build and release actions workflow steps
All checks were successful
/ test (push) Successful in 11s
/ build (push) Successful in 16s
/ publish (push) Successful in 5s
/ fmt (push) Successful in 10s

This commit is contained in:
Julien Dessaux 2025-03-13 01:26:18 +01:00
parent 76b31ba945
commit 3f1620b9cd
Signed by: adyxax
GPG key ID: F92E51B86E07177E

View file

@ -22,3 +22,43 @@ jobs:
go-version-file: 'go.mod' go-version-file: 'go.mod'
- run: | - run: |
make check tidy no-dirty make check tidy no-dirty
build:
if: "${{ startsWith(github.ref, 'refs/tags/') }}"
needs:
- 'fmt'
- 'test'
runs-on: 'self-hosted'
steps:
- uses: 'actions/checkout@v4'
- uses: 'actions/setup-go@v5'
with:
go-version-file: 'go.mod'
- 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'
publish:
needs:
- 'build'
runs-on: 'self-hosted'
steps:
- uses: 'actions/download-artifact@v3'
with:
name: 'ods'
- uses: 'actions/forgejo-release@v2'
with:
direction: 'upload'
tag: '${{ github.ref_name }}'
sha: '${{ github.sha }}'
release-dir: './'
token: '${{ env.GITHUB_TOKEN }}'
hide-archive-link: true
release-notes-assistant: true