Changes token for development workflow github-action #46
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: Development | |
on: | |
push: | |
branches: | |
- "development" | |
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@v4 | |
with: | |
ref: 'development' | |
fetch-depth: 0 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 21 | |
distribution: "adopt" | |
- name: Cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-maven- | |
- name: Set POM version to development | |
run: mvn $MAVEN_CLI_OPTS versions:set -DnewVersion=development | |
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-development.war | |
retention-days: 1 | |
dispatch: | |
needs: deploy | |
strategy: | |
matrix: | |
repo: [ 'keeps/dbptk-desktop', 'keeps/dbptk-enterprise' ] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Repository Dispatch | |
uses: peter-evans/repository-dispatch@v3 | |
with: | |
token: ${{ secrets.REPO_ACCESS_TOKEN }} | |
repository: ${{ matrix.repo }} | |
event-type: dispatch-development |