60 lines
1.7 KiB
YAML
60 lines
1.7 KiB
YAML
name: Release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
tags: '2*'
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: antville
|
|
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
|
LC_TIME: en_US.UTF-8
|
|
TODAY: $(date +'%-d %B %Y')
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- 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: Build with Gradle
|
|
run: ./gradlew assembleDist
|
|
|
|
- name: Create release
|
|
uses: actions/forgejo-release@v2
|
|
with:
|
|
direction: upload
|
|
url: https://code.host.antville.org
|
|
token: ${{ github.token }}
|
|
title: Helma ${{ env.TODAY }}
|
|
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 "Helma ${{ env.TODAY }}" \
|
|
# --notes "${{ steps.create_release_notes.outputs.release_notes }}"
|
|
|
|
# - name: Upload release assets to GitHub
|
|
# run: |
|
|
# gh release upload "$GITHUB_REF_NAME" build/distributions/helma-*.* \
|
|
# --repo "$GITHUB_REPOSITORY" \
|
|
# --clobber
|