From fcffccc1451178b3ae5672cc84caa376a15dc039 Mon Sep 17 00:00:00 2001 From: Patryk Hegenberg Date: Wed, 4 Jun 2025 20:08:49 +0200 Subject: [PATCH] ci: update goreleaser files --- .forgejo/workflows/release.yml | 109 +-------------------------------- .goreleaser.yaml | 9 +-- 2 files changed, 3 insertions(+), 115 deletions(-) diff --git a/.forgejo/workflows/release.yml b/.forgejo/workflows/release.yml index 3aed6bb..8f51234 100644 --- a/.forgejo/workflows/release.yml +++ b/.forgejo/workflows/release.yml @@ -31,111 +31,4 @@ jobs: version: latest args: release --clean env: - GITEA_TOKEN: ${{ secrets.GITEATOKEN }} - -# jobs: -# build: -# runs-on: ubuntu-22.04 -# strategy: -# matrix: -# os: [ubuntu-latest, macos-latest, windows-latest] -# goos: [linux, darwin, windows] -# exclude: -# - os: ubuntu-latest -# goos: darwin -# - os: ubuntu-latest -# goos: windows -# - os: macos-latest -# goos: linux -# - os: macos-latest -# goos: windows -# - os: windows-latest -# goos: linux -# - os: windows-latest -# goos: darwin - -# steps: -# - name: Check out repository -# uses: actions/checkout@v4 - -# - name: Set up Go -# uses: actions/setup-go@v5 -# with: -# go-version: '1.24' - -# - name: Get dependencies -# run: go mod tidy - -# - name: Build for ${{ matrix.goos }} -# run: | -# BUILD_NAME="workctl-${{ matrix.goos }}" -# if [ "${{ matrix.goos }}" = "windows" ]; then -# BUILD_NAME="${BUILD_NAME}.exe" -# fi -# GOOS=${{ matrix.goos }} GOARCH=amd64 go build -o ${BUILD_NAME} . -# ls -la - -# - name: Upload artifact -# uses: actions/upload-artifact@v3 -# with: -# name: workctl-${{ matrix.goos }} -# path: workctl-${{ matrix.goos }}${{ matrix.goos == 'windows' && '.exe' || '' }} -# retention-days: 7 - -# create_release: -# needs: build -# runs-on: ubuntu-22.04 -# steps: -# - name: Create Release -# id: create_release -# uses: actions/create-release@v1 -# env: -# # Dies ist der Token, der Forgejo erlaubt, das Release zu erstellen -# # Du musst einen Gitea/Forgejo API-Token als Repository Secret (z.B. GITEA_TOKEN) hinterlegen. -# # Der Token benötigt die Berechtigung "write:releases" oder "repo". -# GITEA_TOKEN: ${{ secrets.GITEATOKEN }} -# with: -# url: https://git.patanix.de -# tag_name: ${{ github.ref }} -# release_name: Release ${{ github.ref }} -# body: | -# Dies ist ein automatisches Release von ${{ github.ref }}. -# draft: false -# prerelease: false - -# - name: Download all workflow artifacts -# uses: actions/download-artifact@v3 -# with: -# path: ./artifacts - -# - name: Upload Release Asset (Linux) -# uses: actions/upload-release-asset@v4 -# env: -# GITEA_TOKEN: ${{ secrets.GITEATOKEN }} -# with: -# name: workctl-linux -# path: ./artifacts/workctl-linux/workctl-linux -# upload_url: ${{ steps.create_release.outputs.upload_url }} -# asset_path: ./artifacts/workctl-linux/workctl-linux -# asset_name: workctl-linux -# asset_content_type: application/octet-stream - -# - name: Upload Release Asset (macOS) -# uses: actions/upload-release-asset@v1 -# env: -# GITEA_TOKEN: ${{ secrets.GITEATOKEN }}$ -# with: -# upload_url: ${{ steps.create_release.outputs.upload_url }} -# asset_path: ./artifacts/workctl-darwin/workctl-darwin -# asset_name: workctl-darwin -# asset_content_type: application/octet-stream - -# - name: Upload Release Asset (Windows) -# uses: actions/upload-release-asset@v1 -# env: -# GITEA_TOKEN: ${{ secrets.GITEATOKEN }}$ -# with: -# upload_url: ${{ steps.create_release.outputs.upload_url }} -# asset_path: ./artifacts/workctl-windows/workctl-windows.exe -# asset_name: workctl-windows.exe -# asset_content_type: application/octet-stream + GITEA_TOKEN: ${{ secrets.GITEATOKEN }} \ No newline at end of file diff --git a/.goreleaser.yaml b/.goreleaser.yaml index cb15f1a..f8e2923 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -1,9 +1,3 @@ -# This is an example .goreleaser.yml file with some sensible defaults. -# Make sure to check the documentation at https://goreleaser.com - -# The lines below are called `modelines`. See `:help modeline` -# Feel free to remove those if you don't want/need to use them. -# yaml-language-server: $schema=https://goreleaser.com/static/schema.json # vim: set ts=2 sw=2 tw=0 fo=cnqoj version: 2 @@ -55,8 +49,9 @@ changelog: - "^test:" release: + name_template: "{{.ProjectName}}-v{{.Version}} {{.Env.USER}}" footer: >- --- - Released by [GoReleaser](https://github.com/goreleaser/goreleaser). + Released by {{.Env.USER}}.