Skip to content

format pom

format pom #83

Workflow file for this run

name: Build
on:
[push]
jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
outputs:
artifactVersion: ${{ steps.setversion.outputs.version }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: '22'
distribution: 'temurin'
- name: Ensure to use tagged version
run: mvn versions:set --file ./pom.xml -DnewVersion=${GITHUB_REF##*/} # use shell parameter expansion to strip of 'refs/tags'
if: startsWith(github.ref, 'refs/tags/')
- name: Output project version
id: setversion
run: |
BUILD_VERSION=$(mvn help:evaluate "-Dexpression=project.version" -q -DforceStdout)
echo "version=${BUILD_VERSION}" >> "$GITHUB_OUTPUT"
- name: Build and Test
run: mvn -B install
- name: Upload artifact cryptomator-cli-${{ steps.setversion.outputs.version }}.jar
uses: actions/upload-artifact@v4
with:
name: cryptomator-cli-${{ steps.setversion.outputs.version }}.jar
path: target/cryptomator-cli-*.jar
- name: Create release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.CRYPTOBOT_RELEASE_TOKEN }}
generate_release_notes: true
draft: true