remove TODO #73
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
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 |