helma/.github/workflows/release.yml

64 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 --verbose)
cat >> $GITHUB_OUTPUT << .end-of-output
release_notes<<.end
$release_notes
.end
.end-of-output
- name: Debug
run: |
echo "${{ steps.create_release_notes.outputs.release_notes }}"
# - 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: ${{ 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 "${{ 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