Sam Therapy
7a984eceb1
Why not though snap sucks and docker seems kind of pointless since this is just a static file Signed-off-by: Sam Therapy <sam@samtherapy.net>
54 lines
1.3 KiB
YAML
54 lines
1.3 KiB
YAML
name: Forgejo Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "*"
|
|
|
|
env:
|
|
REGISTRY: git.froth.zone
|
|
IMAGE_NAME: ${{ github.repository }}
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: catthehacker/ubuntu:act-latest
|
|
steps:
|
|
# Workaround a dumb docker problem where everything has to be lowercase
|
|
- id: lowercase
|
|
run: |
|
|
echo IMAGE_NAME=$(echo $IMAGE_NAME | tr '[:upper:]' '[:lower:]') >> "${GITHUB_ENV}"
|
|
|
|
- name: Login to Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
submodules: recursive
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version: stable
|
|
|
|
- name: Install scdoc
|
|
run: apt-get update && apt-get install -y scdoc
|
|
|
|
- name: Release with GoReleaser
|
|
uses: goreleaser/goreleaser-action@v5
|
|
with:
|
|
distribution: goreleaser
|
|
version: latest
|
|
args: release --clean --skip snapcraft
|
|
env:
|
|
GORELEASER_FORCE_TOKEN: gitea
|
|
GITEA_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
|
|
UPLOAD_PACKAGES_SECRET: ${{ secrets.PUBLISH_TOKEN }}
|