Files
gosick/.gitea/workflows/prepare-release.yml
Micheal Wilkinson ac41276c50
Some checks failed
Release / prepare (push) Failing after 7s
Push Validation / validate (push) Failing after 13m8s
ci: Correct pipeline
2026-03-21 23:41:13 +00:00

38 lines
1.1 KiB
YAML

name: Release
on:
push:
branches: [main]
permissions:
contents: write
jobs:
prepare:
if: "${{ !startsWith(github.event.head_commit.message, 'chore(release): prepare ') }}"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Provide lowercase changelog compatibility
run: |
set -euo pipefail
if [[ -f CHANGELOG.md && ! -e changelog.md ]]; then
ln -s CHANGELOG.md changelog.md
fi
- name: Prepare release
run: bash ./script/prepare-release.sh
- name: Summary
if: ${{ always() }}
run: |
set -euo pipefail
if git rev-parse -q --verify "refs/tags/$(sed -n 's/^const String = "\([^"]*\)"$/v\1/p' internal/homesick/version/version.go)" >/dev/null; then
echo "Prepared and pushed release tag $(sed -n 's/^const String = "\([^"]*\)"$/v\1/p' internal/homesick/version/version.go)." >> "$GITHUB_STEP_SUMMARY"
else
echo "No release prepared in this run." >> "$GITHUB_STEP_SUMMARY"
fi