Skip to content

Version 1.14.0

Version 1.14.0 #7

Workflow file for this run

# Build a release when a new tag is pushed with a semantic versioning format.
name: Build Release
permissions: {}
on:
push:
tags: ["v[0-9]+.[0-9]+.[0-9]+"]
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout sources
uses: actions/checkout@v5
with:
# Required for changelog generation
fetch-depth: 0
fetch-tags: true
- name: Install gettext
run: |
# Prevent automatic update of mandb when installing a package
sudo rm -f /var/lib/man-db/auto-update
sudo apt-get update && sudo apt-get install -y gettext
- name: Setup Java
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 17
- name: Build with Gradle
run: |
./gradlew dist
- name: Generate changelog
run: |
PREV_TAG="$(git tag --sort=-version:refname --merged ${GITHUB_REF_NAME}~1)"
if [[ -n "${PREV_TAG}" ]]; then
git log "${PREV_TAG}..${GITHUB_REF_NAME}~1" --pretty=format:"- %s%n%w(0,2,2)%b" > CHANGELOG_TEMP.md
else
echo "Unable to generate changelog: No previous tag found" > CHANGELOG_TEMP.md
fi
- name: Create Draft Release.
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
VERSION="${GITHUB_REF_NAME#v}"
gh release create ${{ github.ref_name }} g3dit/dist/g3dit_${VERSION}.zip \
--title "g3dit ${VERSION}" --notes-file CHANGELOG_TEMP.md --draft