Files
status/.github/workflows/release.yml
Nikolay Anoshin c47de4cd63
Some checks failed
Lint Golang / lint (push) Failing after 2m39s
Release / Sematic Release (push) Successful in 12s
Release / Goreleaser (push) Successful in 6m51s
ci: Fix CI
2025-10-29 17:42:11 +00:00

56 lines
1.6 KiB
YAML

name: Release
on:
push:
branches:
- master
- main
permissions:
contents: write
jobs:
semantic-release:
name: Sematic Release
runs-on: self-hosted
outputs:
releaseContentLink: ${{ steps.release.outputs.releaseContentLink }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Release
id: release
run: |
export TMP_FILE_NAME=$(openssl rand -hex 36)
yarn install
yarn semantic-release
echo "releaseContentLink=$(cat /tmp/$TMP_FILE_NAME | curl -F '_=<-' https://past.ostiwe.com)" >> "$GITHUB_OUTPUT"
goreleaser:
needs: semantic-release
name: Goreleaser
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '^1.25'
- name: Install go release
run: go install github.com/goreleaser/goreleaser/v2@latest
- name: Get release notes
id: get-notes
run: |
export FILE_NAME=$(openssl rand -hex 36)
echo "name=$FILE_NAME" >> "$GITHUB_OUTPUT"
curl -L ${{ needs.semantic-release.outputs.releaseContentLink }} >> "/tmp/$FILE_NAME"
- name: Run Goreleaser
env:
GITEA_TOKEN: ${{ secrets.GORELEASER_TOKEN }}
run: |
goreleaser release --release-notes /tmp/${{ steps.get-notes.outputs.name }} --clean
rm /tmp/${{ steps.get-notes.outputs.name }}