Java CI #1196
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: Java CI | |
on: | |
watch: | |
types: started | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
if: github.event.repository.owner.id == github.event.sender.id | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 1.8 | |
- name: Import netbeans dependency | |
run: mvn install:install-file -Dfile=lib/netbeans-lib-profiler.jar -DgroupId=netbeans -DartifactId=netbeans-lib-profiler -Dversion=1.0 -Dpackaging=jar | |
- name: Build with Maven | |
run: mvn -B package --file pom.xml | |
- run: mkdir release && cp target/*-full.jar release | |
- run: echo "NOW=$(date +'%Y%m%dT%H%M%S')" >> $GITHUB_ENV | |
- uses: "marvinpinto/action-automatic-releases@latest" | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
automatic_release_tag: dev-${{ env.NOW }} | |
prerelease: true | |
title: Auto Build - ${{ env.NOW }} | |
files: release/*.jar | |
- name: Upload artifact | |
uses: actions/upload-artifact@v1.0.0 | |
with: | |
# Artifact name | |
name: JDumpSpider_${{ env.NOW }} | |
# Directory containing files to upload | |
path: release |