Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DAT-17264: use build-logic reusable workflow #755

Merged
merged 3 commits into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/attach-artifact-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Attach Artifact to Release

on:
pull_request:
types:
- closed
push:
branches:
- main

jobs:

attach-artifact-to-release:
uses: liquibase/build-logic/.github/workflows/[email protected]
secrets: inherit
26 changes: 3 additions & 23 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,30 +96,10 @@ jobs:
path: |
target/*.jar


draft-release:
create-release:
needs: [ setup, build ]
name: Draft Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Download Artifacts
uses: actions/download-artifact@v4
with:
name: liquibase-test-harness

- name: Release
uses: softprops/action-gh-release@v1
with:
target_commitish: ${{ needs.build.outputs.releaseSha }}
name: v${{ needs.setup.outputs.extensionVersion }}
tag_name: liquibase-test-harness-${{ needs.setup.outputs.extensionVersion }}
draft: true
body: In version ${{ needs.setup.outputs.extensionVersion }} we
files: liquibase-test-harness-*.jar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: liquibase/build-logic/.github/workflows/[email protected]
secrets: inherit

bump-pom-to-snapshot:
name: Prepare POM for Development
Expand Down
27 changes: 4 additions & 23 deletions .github/workflows/release-published.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,11 @@
name: Release Extension to Sonatype

on:
workflow_dispatch:
release:
types: [published]

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Java for publishing to Maven Central Repository
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
cache: 'maven'
server-id: sonatype-nexus-staging
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_SECRET }}
gpg-passphrase: GPG_PASSPHRASE

- name: Publish to the Maven Central Repository
run: mvn clean deploy -DskipTests=true -P release-sign-artifacts
env:
MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.SONATYPE_TOKEN }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
release:
uses: liquibase/build-logic/.github/workflows/[email protected]
secrets: inherit
Loading