Nah, not worth it.
This commit is contained in:
parent
6c46cc09bc
commit
ae166e7aa7
1 changed files with 0 additions and 42 deletions
|
|
@ -1,42 +0,0 @@
|
||||||
name: Create Draft Release Notes
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- "v*"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
create-release:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
run: |
|
|
||||||
git clone --depth 1 https://token:${{ secrets.ACTIONS_TOKEN }}@gugulet.hu/technical/git/g_it/site.git .
|
|
||||||
|
|
||||||
- name: Generate release notes
|
|
||||||
id: notes
|
|
||||||
run: |
|
|
||||||
CURRENT_TAG=$(git describe --tags --exact-match)
|
|
||||||
PREVIOUS_TAG=$(git tag --sort=-version:refname --list | awk "NR>1 {print; exit}")
|
|
||||||
|
|
||||||
if [ -z "$PREVIOUS_TAG" ]; then
|
|
||||||
CHANGELOG=$(git log --pretty=format:"- %s" --no-decorate)
|
|
||||||
else
|
|
||||||
CHANGELOG=$(git log ${PREVIOUS_TAG}..${CURRENT_TAG} --pretty=format:"- %s" --no-decorate)
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "changelog=$CHANGELOG" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Create release via Forgejo API
|
|
||||||
run: |
|
|
||||||
curl -X POST https://${{ gitea.server }}/api/v1/repos/${{ gitea.repository }}/releases \
|
|
||||||
-H "Authorization: token ${{ secrets.ACTIONS_TOKEN }}" \
|
|
||||||
-H "Content-Type: application/json" \
|
|
||||||
-d '{
|
|
||||||
"tag_name": "${{ gitea.ref_name }}",
|
|
||||||
"name": "Release ${{ gitea.ref_name }}",
|
|
||||||
"body": "## Changes\n\n${{ steps.notes.outputs.changelog }}",
|
|
||||||
"draft": true,
|
|
||||||
"prerelease": false
|
|
||||||
}'
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue