Added gitea action
Some checks failed
Build & Release / build (amd64, linux) (push) Successful in 35s
Build & Release / build (amd64, windows) (push) Successful in 36s
Build & Release / build (arm, linux) (push) Successful in 37s
Build & Release / build (arm, windows) (push) Successful in 36s
Build & Release / release (push) Failing after 20s

This commit is contained in:
2025-07-16 16:18:27 +02:00
parent d167d6afc6
commit afbd0433d9

View File

@@ -0,0 +1,59 @@
name: Build & Release
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, windows]
goarch: [amd64, arm]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22.x'
- name: Build binary
run: |
GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -o dist/app-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.goos == 'windows' && '.exe' || '' }} main.go
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: app-${{ matrix.goos }}-${{ matrix.goarch }}
path: dist/app-*
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
path: ./dist
- name: Create Release & Attach Files
uses: rosven9856/gitea_creating_release_action@master
with:
gitea_schema: 'https'
gitea_host: 'git.ztsw.de'
gitea_organization: 'pedan'
gitea_repo: 'go-fileserver'
access_token: ${{ secrets.GITEA_TOKEN }}
release_body: 'Auto-build release'
release_draft: 'false'
release_name: ${{ github.ref_name }}
release_prerelease: 'false'
release_tag_name: ${{ github.ref_name }}
release_target_commitish: ${{ github.sha }}
# Optional: attach all built binaries
env:
ASSETS_PATH: ./dist/app-*