Files
test-release-merging/.gitea/workflows/release.yaml
Tim Basten 02634dca9b
All checks were successful
release / release (push) Successful in 8s
feature: This is a mega update
2026-02-06 12:49:14 +08:00

57 lines
1.6 KiB
YAML

name: release
on:
push:
tags:
- "*"
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: setup go
uses: https://github.com/actions/setup-go@v4
with:
go-version: '>=1.20.1'
- name: Install go-gitea/changelog
run: |
wget https://dl.gitea.com/changelog-tool/main/changelog-main-linux-amd64
chmod +x changelog-main-linux-amd64
sudo mv changelog-main-linux-amd64 /usr/local/bin/changelog
# - name: Generate changelog
# id: changelog
# run: |
# VERSION="${GITHUB_REF_NAME}"
# changelog generate -t="${VERSION}" -c="${GITHUB_WORKSPACE}/changelog.yml" > CHANGELOG.md
# echo "changelog<<EOF" >> $GITHUB_OUTPUT
# cat CHANGELOG.md >> $GITHUB_OUTPUT
# echo "EOF" >> $GITHUB_OUTPUT
- name: Generate changelog
id: changelog
env:
CHANGELOG_TOKEN: ${{ secrets.CHANGELOG_TOKEN }}
run: |
VERSION="${GITHUB_REF_NAME}"
changelog generate \
-t="${VERSION}" \
-c="${GITHUB_WORKSPACE}/changelog.yml" \
--token="${CHANGELOG_TOKEN}" > CHANGELOG.md
echo "changelog<<EOF" >> $GITHUB_OUTPUT
cat CHANGELOG.md >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Create Gitea Release
uses: akkuman/gitea-release-action@v1
with:
token: ${{ secrets.GITEA_TOKEN }}
tag_name: ${{ gitea.ref_name }}
name: ${{ gitea.ref_name }}
body: ${{ steps.changelog.outputs.changelog }}