Build and Deploy #17
Workflow file for this run
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: Build and Deploy | |
on: workflow_dispatch | |
permissions: | |
contents: write | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: master | |
- name: Setup git config | |
run: | | |
git config user.name github-actions | |
git config user.email [email protected] | |
- name: Set up JDK 19 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '19' | |
distribution: 'corretto' | |
cache: maven | |
server-id: maven # Value of the distributionManagement/repository/id field of the pom.xml | |
server-username: ${{ secrets.MAVEN_USERNAME }} # env variable for username in deploy | |
server-password: ${{ secrets.MAVEN_CENTRAL_TOKEN }} # env variable for token in deploy | |
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import | |
- name: Prepare for release | |
run: mvn -B release:prepare --file pom.xml | |
- name: Perform release | |
run: mvn -B release:perform --file.pom.xml | |
- name: Update dependency graph | |
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6 |