Bumped upload-artifact action version to v4 #45
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: Latest | |
on: | |
push: | |
branches: | |
- "master" | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
env: | |
MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version" | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
ref: 'master' | |
fetch-depth: 0 | |
- name: Set up JDK 8 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 8 | |
distribution: 'adopt' | |
- name: Cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-maven- | |
- name: Set POM version to staging | |
run: mvn $MAVEN_CLI_OPTS versions:set -DnewVersion=latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Package | |
run: mvn $MAVEN_CLI_OPTS clean package -Dmaven.test.skip=true -Pdefault | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: artifact | |
path: target/dbvtk-latest.war | |
retention-days: 1 | |
dispatch: | |
needs: deploy | |
strategy: | |
matrix: | |
repo: [ 'keeps/dbptk-enterprise' ] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Repository Dispatch | |
uses: peter-evans/repository-dispatch@v1 | |
with: | |
token: ${{ secrets.REPO_ACCESS_TOKEN }} | |
repository: ${{ matrix.repo }} | |
event-type: dispatch-latest |