antville/.github/workflows/release.yml
Tobi Schäfer 7821dd0142
All checks were successful
Release / release (push) Successful in 57s
Add release notes generated with git-cliff
2025-03-01 16:42:17 +01:00

59 lines
1.7 KiB
YAML

name: Release
on:
workflow_dispatch:
push:
tags: '1.6.*'
permissions:
contents: write
jobs:
release:
runs-on: antville
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
LC_TIME: en_US.UTF-8
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build with Gradle
run: ./gradlew assembleDist
- name: Create release notes
id: create_release_notes
run: |
release_notes=$(npx git-cliff@latest --latest)
# Write the release notes as a heredoc to the workflow output
# ⚠️ No white space around `<<` is crucial!
echo "release_notes<<.eot0x03" >> $GITHUB_OUTPUT
echo "$release_notes" >> $GITHUB_OUTPUT
echo ".eot0x03" >> $GITHUB_OUTPUT
- name: Create release
uses: actions/forgejo-release@v2
with:
direction: upload
url: https://code.host.antville.org
token: ${{ github.token }}
title: Antville ${{ github.ref_name }}
release-dir: build/distributions
release-notes: ${{ steps.create_release_notes.outputs.release_notes }}
verbose: true
# - name: Create release at GitHub
# run: |
# gh release create "$GITHUB_REF_NAME" \
# --repo "$GITHUB_REPOSITORY" \
# --title "Antville ${{ github.ref_name }}" \
# --notes "${{ steps.create_release_notes.outputs.release_notes }}"
# - name: Upload release assets to GitHub
# run: |
# gh release upload "$GITHUB_REF_NAME" build/distributions/ant*.* \
# --repo "$GITHUB_REPOSITORY" \
# --clobber