Skip to content

Bump version to 0.16 #17

Bump version to 0.16

Bump version to 0.16 #17

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
fetch-depth: 0
# Built here rather than downloaded from the CI run: pushing a tag
# starts its own CI run, so fetching that run's artifact races it.
- name: Build binary inside Amiga GCC container
run: make docker-build
# Packed in the toolchain container, which carries a working LHa;
# Ubuntu's "lha" is now lhasa, which only extracts.
- name: Create release archive
env:
TAG: ${{ github.ref_name }}
run: make docker-release TAG="$TAG"
- name: Create release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ github.ref_name }}
run: |
VER=${TAG#v}
PREV_TAG=$(git describe --tags --abbrev=0 "$TAG^" 2>/dev/null || true)
if [ -n "$PREV_TAG" ]; then
RANGE="$PREV_TAG..$TAG"
else
RANGE="$TAG"
fi
# --notes-file, so a tag message or commit subject can never be read
# as workflow syntax the way a $GITHUB_OUTPUT heredoc can.
#
# The tag's message body, if it has one, becomes the prose at the top
# of the release; write it with "git tag -a -e". A tag with only a
# subject line leaves just the commit list.
{
NOTES=$(git tag -l --format='%(contents:body)' "$TAG")
if [ -n "$NOTES" ]; then
printf '%s\n\n' "$NOTES"
fi
echo "## Changes"
echo
git log --pretty=format:"- %h: %s" "$RANGE"
} > notes.md
gh release create "$TAG" "p96cts-$VER.lha" \
--title "Release $VER" --notes-file notes.md