Skip to content

Commit

Permalink
Fixing 4.6.2 release
Browse files Browse the repository at this point in the history
  • Loading branch information
nvoxland committed Dec 2, 2021
1 parent b8114eb commit 7856595
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 32 deletions.
13 changes: 4 additions & 9 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,10 @@ jobs:
mvn -B versions:set -DnewVersion=${{ needs.setup.outputs.extensionVersion }} -DallowSnapshots=false -DoldVersion="*"
mvn -B versions:use-dep-version -Dincludes=org.liquibase:liquibase-core -DdepVersion=${{ needs.setup.outputs.liquibaseVersion }} -DforceVersion=true
if git diff-index --cached --quiet HEAD --
then
echo "Nothing new to commit"
else
git add pom.xml
git commit -m "Version Bumped to ${{ needs.setup.outputs.extensionVersion }}"
git tag -a -m "Version Bumped to ${{ needs.setup.outputs.extensionVersion }}" liquibase-cassandra-${{ needs.setup.outputs.extensionVersion }}
git push "https://liquibot:[email protected]/$GITHUB_REPOSITORY.git" HEAD:${{ github.ref }} --follow-tags --tags
fi
git add pom.xml
git commit -m "Version Bumped to ${{ needs.setup.outputs.extensionVersion }}"
git tag -a -m "Version Bumped to ${{ needs.setup.outputs.extensionVersion }}" liquibase-cassandra-${{ needs.setup.outputs.extensionVersion }}
git push "https://liquibot:[email protected]/$GITHUB_REPOSITORY.git" HEAD:${{ github.ref }} --follow-tags --tags
env:
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}

Expand Down
73 changes: 52 additions & 21 deletions .github/workflows/release-published.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,59 @@ name: Release Extension to Sonatype

on:
release:
types: [published]
types: [ published ]
workflow_dispatch:
inputs:
tag:
description: 'Release Tag'
required: true

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
setup:
name: Setup
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.collect-data.outputs.tag }}
steps:
- name: Collect Data
id: collect-data
uses: actions/github-script@v4
with:
script: |
let tag;
if (context.payload.inputs) {
tag = context.payload.inputs.tag;
} else {
tag = context.payload.release.tag_name;
}
- name: Set up Java for publishing to Maven Central Repository
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
server-id: sonatype-nexus-staging
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_SECRET }}
gpg-passphrase: GPG_PASSPHRASE
core.setOutput("tag", tag);
- name: Publish to the Maven Central Repository
run: mvn clean deploy -Dmaven.test.skip -P release
env:
MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.SONATYPE_TOKEN }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- run: |
echo "Publishing from ${{ steps.collect-data.outputs.tag }}"
release:
runs-on: ubuntu-latest
needs: [ setup ]
steps:
- uses: actions/checkout@v2
with:
ref: ${{ needs.setup.outputs.version }}

- name: Set up Java for publishing to Maven Central Repository
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
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 -Dmaven.test.skip -P release
env:
MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.SONATYPE_TOKEN }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.liquibase.ext</groupId>
<artifactId>liquibase-cassandra</artifactId>
<version>4.6.3-SNAPSHOT</version>
<version>4.6.2</version>
<name>Liquibase Extension: Cassandra Database Support</name>
<description>Adds support for Cassandra database</description>
<url>https://github.com/liquibase/liquibase-cassandra</url>
Expand Down Expand Up @@ -43,7 +43,7 @@
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-core</artifactId>
<version>4.6.1</version>
<version>4.6.2</version>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand Down

0 comments on commit 7856595

Please sign in to comment.