Skip to content

Commit

Permalink
✨ (deploy-snapshot.yml): add GitHub Actions workflow for deploying ma…
Browse files Browse the repository at this point in the history
…ster snapshots to GitHub Packages (#972)

🔧 (pom.xml): update distribution management to use GitHub Packages for deployment instead of Sonatype Nexus
  • Loading branch information
jandroav authored Jan 20, 2025
1 parent 294558e commit a290c38
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 6 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/deploy-snapshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
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 }}

- 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 }}
12 changes: 6 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -458,14 +458,14 @@
</build>
<distributionManagement>
<repository>
<id>sonatype-nexus-staging</id>
<name>Nexus Release Repository</name>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
<id>github</id>
<name>GitHub Packages</name>
<url>https://maven.pkg.github.com/liquibase/liquibase-test-harness</url>
</repository>
<snapshotRepository>
<id>sonatype-nexus-snapshots</id>
<name>Sonatype Nexus Snapshots</name>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<id>github</id>
<name>GitHub Packages Snapshots</name>
<url>https://maven.pkg.github.com/liquibase/liquibase-test-harness</url>
</snapshotRepository>
</distributionManagement>
<profiles>
Expand Down

0 comments on commit a290c38

Please sign in to comment.