CrazyAuctions/.github/workflows/maven.yml
2022-06-10 23:55:08 -04:00

50 lines
1.5 KiB
YAML

# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# 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@v2
- uses: actions/setup-java@v1
with:
java-version: '11'
distribution: 'temurin'
- run: mvn -B package --file pom.xml -DskipTests
- run: mkdir staging && cp target/*.jar Crazy-Auctions
- uses: actions/upload-artifact@v1
with:
name: Crazy-Auctions
path: staging
create-release:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
with:
fetch-depth: 0 # need this for all history for all branches and tags
- name: Create Release
id: create_release
uses: nickatnight/releases-action@v3
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
outputs:
ReleaseTag: ${{ steps.create_release.outputs.release_tag }}
# pass in as env variable
explore-essos:
runs-on: ubuntu-latest
needs: [create-release]
env:
RELEASE_TAG: ${{ needs.create-release.outputs.ReleaseTag }}