Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 6. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
49 lines
1.2 KiB
YAML
49 lines
1.2 KiB
YAML
# On push of a version tag (e.g. v1.0.0): build, publish to GitHub Packages, create Release, upload JARs.
|
|
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
permissions:
|
|
contents: write
|
|
packages: write
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
RELEASE_VERSION: ${{ github.ref_name }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Set up JDK 21
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
distribution: temurin
|
|
java-version: 21
|
|
cache: gradle
|
|
|
|
- name: Strip v from version
|
|
run: echo "RELEASE_VERSION=${RELEASE_VERSION#v}" >> $GITHUB_ENV
|
|
|
|
- name: Build
|
|
run: chmod +x gradlew && ./gradlew build --no-daemon
|
|
|
|
- name: Publish to GitHub Packages
|
|
run: ./gradlew publish --no-daemon
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
continue-on-error: true
|
|
# 409 = version already exists; use a new tag (e.g. v1.0.2) next time
|
|
|
|
- name: Create Release
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
generate_release_notes: true
|
|
files: build/libs/*.jar
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|