[maven-release-plugin] prepare release radiobrowser4j-parent-3.0.3 #22
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 release process looks for tags and produces releases. | |
name: Release | |
on: | |
push: | |
tags: | |
- 'radiobrowser4j-parent-*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.version.outputs.version }} | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'adopt' | |
java-version: 21 | |
- name: Cache Maven packages | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.m2/repository | |
key: maven-build | |
- name: Build with Maven | |
run: mvn -B package --file pom.xml | |
- name: Extract current maven version | |
run: echo "::set-output name=version::$(mvn org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate -Dexpression=project.version -q -DforceStdout)" | |
id: version | |
shell: bash | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: radiobrowser4j-${{ steps.version.outputs.version }}.jar | |
path: radiobrowser4j/target/radiobrowser4j-${{ steps.version.outputs.version }}.jar | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: radiobrowser4j-${{ steps.version.outputs.version }}-javadoc.jar | |
path: radiobrowser4j/target/radiobrowser4j-${{ steps.version.outputs.version }}-javadoc.jar | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: radiobrowser4j-${{ steps.version.outputs.version }}-sources.jar | |
path: radiobrowser4j/target/radiobrowser4j-${{ steps.version.outputs.version }}-sources.jar | |
- uses: actions/create-release@v1 | |
id: create_release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: ${{ github.ref }} | |
draft: true | |
body: | | |
# Release ${{ steps.version.outputs.version }} | |
## Changes | |
* 1 | |
* 2 | |
* 3 | |
- uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_name: radiobrowser4j-${{ steps.version.outputs.version }}.jar | |
asset_path: radiobrowser4j/target/radiobrowser4j-${{ steps.version.outputs.version }}.jar | |
asset_content_type: application/java-archive | |
- uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_name: radiobrowser4j-${{ steps.version.outputs.version }}-javadoc.jar | |
asset_path: radiobrowser4j/target/radiobrowser4j-${{ steps.version.outputs.version }}-javadoc.jar | |
asset_content_type: application/java-archive | |
- uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_name: radiobrowser4j-${{ steps.version.outputs.version }}-sources.jar | |
asset_path: radiobrowser4j/target/radiobrowser4j-${{ steps.version.outputs.version }}-sources.jar | |
asset_content_type: application/java-archive |