[RFR-1187] Fix upload crash without locations #24
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow publishes a new version to the Github Registry. | |
# | |
# @author Armin Schnabel | |
# @version 1.0.0 | |
# @since 1.0.0 | |
name: Gradle Publish | |
on: | |
push: | |
tags: | |
- '[0-9]+.[0-9]+.[0-9]+*' | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '11' | |
# version is required to publish artifacts to Github Registry | |
- name: Set version | |
run: | | |
sed -i "s/version = \"0.0.0\"/version = \"${{ github.ref_name }}\"/g" build.gradle.kts | |
# Publish slim JARS to Github Package Registry | |
- name: Publish with Gradle | |
run: ./gradlew publish | |
env: | |
USERNAME: ${{ github.actor }} | |
PASSWORD: ${{ secrets.GITHUB_TOKEN }} | |
# Automatically mark this tag as release on Github | |
- name: Mark tag as release on Github | |
uses: actions/create-release@v1 | |
id: create_release | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: ${{ github.ref }} | |
draft: false | |
# Release tags of format `1.2.3-beta1 / -alpha1 / -test1` are considered a pre-release | |
prerelease: ${{ contains(github.ref, 'test') || contains(github.ref, 'alpha') || contains(github.ref, 'beta') }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |