Skip to content

chore(deps): update actions/setup-java action to v3 - autoclosed #105

chore(deps): update actions/setup-java action to v3 - autoclosed

chore(deps): update actions/setup-java action to v3 - autoclosed #105

Workflow file for this run

# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Java CI with Maven
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 16
uses: actions/setup-java@v3
with:
java-version: 16
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Set SHORT_SHA
id: vars
run: echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Create a Release
if: github.event_name == 'push' || github.ref == 'refs/heads/master'
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.vars.outputs.SHORT_SHA }}
release_name: Release ${{ steps.vars.outputs.SHORT_SHA }}
draft: true
prerelease: false
- name: Upload Release Asset
if: github.event_name == 'push' || github.ref == 'refs/heads/master'
uses: actions/upload-release-asset@v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./target/SystemdLogTracker-jar-with-dependencies.jar
asset_name: SystemdLogTracker.jar
asset_content_type: application/java-archive