Added goreleaser and release workflow
Some checks failed
Build and Release / release (push) Failing after 27s
Some checks failed
Build and Release / release (push) Failing after 27s
This commit is contained in:
parent
314e519446
commit
67a576f786
26
.forgejo/workflows/release.yaml
Normal file
26
.forgejo/workflows/release.yaml
Normal file
|
@ -0,0 +1,26 @@
|
|||
name: Build and Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: docker
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: '1.24'
|
||||
- name: Install Goreleaser
|
||||
run: |
|
||||
curl -sL https://git.io/goreleaser | bash
|
||||
- name: Run Goreleaser
|
||||
env:
|
||||
GORELEASER_CURRENT_TAG: ${{ github.ref_name }}
|
||||
FORGEJO_USERNAME: ${{ secrets.FORGEJO_PACKAGE_PUBLISH_USERNAME }}
|
||||
FORGEJO_TOKEN: ${{ secrets.FORGEJO_PACKAGE_PUBLISH_TOKEN }}
|
||||
run: |
|
||||
./bin/goreleaser release --clean --skip-validate
|
25
.goreleaser.yaml
Normal file
25
.goreleaser.yaml
Normal file
|
@ -0,0 +1,25 @@
|
|||
project_name: send2gokapi
|
||||
|
||||
builds:
|
||||
- main: .
|
||||
goos:
|
||||
- linux
|
||||
- darwin
|
||||
goarch:
|
||||
- amd64
|
||||
- arm64
|
||||
|
||||
archives:
|
||||
- format: zip
|
||||
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
|
||||
|
||||
release:
|
||||
disable: true # We won't create GitHub/Gitea releases directly
|
||||
|
||||
blobs:
|
||||
- provider: generic
|
||||
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}.tar.gz"
|
||||
path: dist/*
|
||||
url_template: https://lmika.dev/api/packages/cmd/generic/{{ .ProjectName }}/{{ .Version }}/{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}.tar.gz
|
||||
username: "${FORGEJO_USERNAME}"
|
||||
password: "${FORGEJO_TOKEN}"
|
Loading…
Reference in a new issue