Skip to content

Commit

Permalink
Test workflow (#32)
Browse files Browse the repository at this point in the history
* chore(build-nightly.yml): remove nightly build workflow

chore(pom.xml): update build-helper-maven-plugin version to 3.4.0 for compatibility improvements
chore(pom.xml): update maven-failsafe-plugin version to 3.1.2 for bug fixes
chore(pom.xml): update maven-resources-plugin version to 3.3.1 for compatibility improvements
chore(pom.xml): update mockito-core version to 5.5.0 for new features and bug fixes
chore(pom.xml): update mockito-junit-jupiter version to 5.5.0 for new features and bug fixes
chore(pom.xml): update liquibase-test-harness version to 1.0.9 for compatibility improvements
feat(pom.xml): add maven-failsafe-plugin configuration for integration tests
feat(pom.xml): add executions for building javadoc and sources jars

* chore(pom.xml): update version from 0.0.1-SNAPSHOT to 0.1.0-SNAPSHOT for consistency and clarity

* chore(README.md): update liquibase-parent-pom version to 0.1.0 in the example code to reflect the desired version

* chore(release-published.yml): update workflow file to use the correct extension release logic file
chore(release-published.yml): update workflow file to use the correct pom release logic file for DAT-15505

* chore(release-published.yml): update workflow name to "Release Extension to Sonatype" for clarity and accuracy
docs(pom.xml): add URL to the GitHub repository for the parent POM to provide more information and context

* chore(pom.xml): update version from 0.2.0-SNAPSHOT to 0.1.0-SNAPSHOT to align with project versioning scheme

* chore(attach-artifact-release.yml): update workflow to use latest version of extension-attach-artifact-release.yml
chore(release-published.yml): update workflow to use latest version of extension-release-published.yml
chore(pom.xml): add developer information for Nathan Voxland

* chore(upload_asset.sh): remove unused script for uploading assets

The script `.github/upload_asset.sh` was removed as it was no longer being used. This script was responsible for uploading assets to a GitHub release. However, it was not being used in the project anymore, so it was deleted to clean up the codebase.

* feat(upload_asset.sh): add script to upload release assets to GitHub
feat(attach-artifact-release.yml): add workflow to attach artifact to release when pull request is merged
feat(release-published.yml): add workflow to publish release artifacts to Maven Central Repository

* fix(release-published.yml): remove duplicate entry for jar.asc in the -Dtypes parameter to fix build issue

* chore(release-published.yml): rename workflow from "Release Extension to Sonatype" to "Release POM to Sonatype" for clarity and accuracy
chore(release-published.yml): remove unnecessary steps and configurations related to Java and Maven release artifacts
chore(release-published.yml): update workflow to use the latest version of the "pom-release-published.yml" workflow from the "liquibase/build-logic" repository
  • Loading branch information
jandroav authored Sep 15, 2023
1 parent 3468535 commit 6d1ff08
Showing 1 changed file with 2 additions and 58 deletions.
60 changes: 2 additions & 58 deletions .github/workflows/release-published.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release Extension to Sonatype
name: Release POM to Sonatype

on:
workflow_dispatch:
Expand All @@ -11,61 +11,5 @@ permissions:

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

- name: Set up Java for publishing to Maven Central Repository
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: 'maven'
server-id: sonatype-nexus-staging
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD

- name: Configure Git
run: |
git config user.name "liquibot"
git config user.email "liquibot@liquibase.org"
- name: Build release artifacts
id: build-release-artifacts
run: |
mvn -B release:clean release:prepare -Dusername=liquibot -Dpassword=$GITHUB_TOKEN -Darguments="-Dmaven.javadoc.skip=true -Dmaven.test.skipTests=true -Dmaven.test.skip=true -Dmaven.deploy.skip=true" -DreleaseVersion=${{ github.event.inputs.liquibaseVersion }} -DpushChanges=false
git reset HEAD~ --hard
- name: Get Artifact ID
id: get-artifact-id
run: echo "artifact_id=$(mvn help:evaluate -Dexpression=project.artifactId -q -DforceStdout)" >> $GITHUB_ENV

- name: Download Release Artifacts
uses: robinraju/release-downloader@v1.6
with:
tag: "${{ github.event.release.tag_name }}"
filename: "${{ env.artifact_id }}-*"
out-file-path: "."

- name: Publish to Maven Central
env:
MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.SONATYPE_TOKEN }}
run: |
version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
mvn -B org.apache.maven.plugins:maven-deploy-plugin:3.0.0-M1:deploy-file \
-Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ \
-DrepositoryId=sonatype-nexus-staging \
-DpomFile=${{ env.artifact_id }}-${version}.pom \
-DgeneratePom=false \
-Dfile=${{ env.artifact_id }}-${version}.pom \
-Dsources=${{ env.artifact_id }}-${version}-sources.jar \
-Djavadoc=${{ env.artifact_id }}-${version}-javadoc.jar \
-Dfiles=${{ env.artifact_id }}-${version}-sources.jar.asc,${{ env.artifact_id }}-${version}-javadoc.jar.asc,${{ env.artifact_id }}-${version}.pom.asc \
-Dtypes=jar.asc,jar.asc,pom.asc \
-Dclassifiers=,sources,javadoc,
maven-release:
needs: release
uses: liquibase/build-logic/.github/workflows/extension-release-prepare.yml@v0.4.2
uses: liquibase/build-logic/.github/workflows/pom-release-published.yml@DAT-15505
secrets: inherit

0 comments on commit 6d1ff08

Please sign in to comment.