47 lines
1.2 KiB
YAML
47 lines
1.2 KiB
YAML
name: Create Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Wait for Gitea release
|
|
run: sleep 60
|
|
|
|
- name: Fetch release notes from Gitea
|
|
id: gitea_notes
|
|
env:
|
|
TAG_NAME: ${{ github.ref_name }}
|
|
run: |
|
|
NOTES=$(curl -s "https://somegit.dev/api/v1/repos/vikingowl/vessel/releases/tags/${TAG_NAME}" | jq -r '.body // empty')
|
|
if [ -n "$NOTES" ]; then
|
|
echo "found=true" >> $GITHUB_OUTPUT
|
|
{
|
|
echo "notes<<EOF"
|
|
echo "$NOTES"
|
|
echo "EOF"
|
|
} >> $GITHUB_OUTPUT
|
|
else
|
|
echo "found=false" >> $GITHUB_OUTPUT
|
|
echo "notes=See the [full release notes on Gitea](https://somegit.dev/vikingowl/vessel/releases/tag/${TAG_NAME}) for detailed information." >> $GITHUB_OUTPUT
|
|
fi
|
|
|
|
- name: Create GitHub Release
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
body: ${{ steps.gitea_notes.outputs.notes }}
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|