✨ (workflow): add GitHub Actions workflow for deploying master snapsh… #1
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: Deploy Master Snapshot | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: "17" | |
distribution: "temurin" | |
cache: "maven" | |
server-id: github | |
server-username: liquibot | |
server-password: ${{ secrets.GITHUB_TOKEN }} | |
# look for dependencies in maven | |
- name: maven-settings-xml-action | |
uses: whelk-io/maven-settings-xml-action@v22 | |
with: | |
repositories: | | |
[ | |
{ | |
"id": "liquibase", | |
"url": "https://maven.pkg.github.com/liquibase/liquibase", | |
"releases": { | |
"enabled": "true" | |
}, | |
"snapshots": { | |
"enabled": "true", | |
"updatePolicy": "always" | |
} | |
}, | |
{ | |
"id": "liquibase-pro", | |
"url": "https://maven.pkg.github.com/liquibase/liquibase-pro", | |
"releases": { | |
"enabled": "true" | |
}, | |
"snapshots": { | |
"enabled": "true", | |
"updatePolicy": "always" | |
} | |
} | |
] | |
servers: | | |
[ | |
{ | |
"id": "liquibase-pro", | |
"username": "liquibot", | |
"password": "${{ secrets.LIQUIBOT_PAT }}" | |
}, | |
{ | |
"id": "liquibase", | |
"username": "liquibot", | |
"password": "${{ secrets.LIQUIBOT_PAT }}" | |
} | |
] | |
- name: Update version to master-SNAPSHOT | |
run: mvn versions:set -DnewVersion=master-SNAPSHOT | |
- name: Build and deploy snapshot | |
run: mvn deploy -P release -DskipTests | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |