Skip to content

Commit

Permalink
Merge pull request #791 from thadguidry/fix-publishing
Browse files Browse the repository at this point in the history
improve the CI workflows
  • Loading branch information
thadguidry authored Nov 12, 2024
2 parents 71a5490 + 259692a commit 6fda829
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 46 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
name: CI Build & Test
name: Build & Verify

on:
workflow_dispatch:
inputs:
version:
description: 'Version to publish'
required: true
default: '1.3.0-SNAPSHOT'
ref:
description: 'Type the Branch, Tag or SHA to use for publishing Snapshot'
required: false
default: 'master'
pull_request:
paths-ignore:
-
Expand Down
37 changes: 0 additions & 37 deletions .github/workflows/main.yml

This file was deleted.

13 changes: 9 additions & 4 deletions .github/workflows/maven-central-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
name: Checkout code for Tag
with:
ref: ${{ github.ref }}
- name: Echo Tag
run: "echo 'CHECKED OUT TAG: ${{ github.ref }}'"
- name: Set up JDK 21 and maven settings.xml
uses: actions/setup-java@v4
with:
java-version: '21'
Expand All @@ -27,8 +32,8 @@ jobs:
server-password: MAVEN_PASSWORD
server-id: central

- name: Publish package
run: mvn -B deploy -P release -DskipTests
- name: Publish package DB2Rest
run: mvn -Drevision=${{ github.ref }} --no-transfer-progress -B deploy -P release -DskipTests
# below we use env for passing GPG stuff since the signing type is bouncy castle (bc)
# set in parent pom's maven-gpg-plugin configuration and doesn't need gpg agent.
env:
Expand All @@ -38,7 +43,7 @@ jobs:
MAVEN_GPG_KEY: ${{ secrets.MAVEN_GPG_KEY }}

- name: Publish package Oracle9i
run: mvn -B deploy -P release --file api-rest/pom-oracle9i.xml -DskipTests
run: mvn -Drevision=${{ github.ref }} --no-transfer-progress -B deploy -P release --file api-rest/pom-oracle9i.xml -DskipTests
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ on:
workflow_dispatch:
inputs:
version:
description: 'Version to publish'
description: 'Version to publish, such as 1.3.0-SNAPSHOT'
required: true
default: '1.3.0-SNAPSHOT'
ref:
description: 'Type the Branch, Tag or SHA to use for publishing Snapshot'
description: 'The Branch, Tag or SHA to use to publish Snapshot'
required: false
default: 'master'

Expand All @@ -27,7 +27,7 @@ jobs:
with:
ref: ${{ github.event.inputs.ref }}

- name: Set up Java 21
- name: Set up Java 21 and set GitHub for publishing in settings.xml
uses: actions/setup-java@v4
with:
distribution: 'liberica'
Expand All @@ -36,6 +36,6 @@ jobs:
server-id: github

- name: Compile & Deploy to GitHub Packages
run: mvn -Drevision=${{ github.event.inputs.version }} -B deploy -DdeployAtEnd --file pom.xml
run: mvn -Drevision=${{ github.event.inputs.version }} --no-transfer-progress -B deploy -DdeployAtEnd --file pom.xml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 6fda829

Please sign in to comment.