Skip to content

Commit

Permalink
Test workflow (#28)
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
  • Loading branch information
jandroav authored Sep 15, 2023
1 parent 168b3cf commit 016a64d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 77 deletions.
78 changes: 3 additions & 75 deletions .github/workflows/attach-artifact-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,79 +6,7 @@ on:
- closed

jobs:
attach-to-release:
name: Attach Artifact to Release
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- run: sleep 30
- uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'
cache: 'maven'

- name: Get Reusable Script Files
run: |
curl -o $PWD/.github/get_draft_release.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.4.2/.github/get_draft_release.sh
curl -o $PWD/.github/sign_artifact.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.4.2/.github/sign_artifact.sh
chmod +x $PWD/.github/get_draft_release.sh
chmod +x $PWD/.github/sign_artifact.sh
chmod +x $PWD/.github/upload_asset.sh
- name: Configure Git
run: |
git config user.name "liquibot"
git config user.email "[email protected]"
- 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
mvn clean install -DskipTests
- name: Get Artifact ID
id: get-artifact-id
run: echo "artifact_id=$(mvn help:evaluate -Dexpression=project.artifactId -q -DforceStdout)" >> $GITHUB_ENV

- name: Get Release Tag
id: get-release-tag
run: echo "release_tag=$(./.github/get_draft_release.sh TAG)" >> $GITHUB_ENV
env:
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}

- name: Delete Outdated Files from Draft Release
id: delete-outdated-release-asset
uses: mknejp/delete-release-assets@v1
with:
token: ${{ secrets.BOT_TOKEN }}
tag: ${{ env.release_tag }}
fail-if-no-assets: false
fail-if-no-release: false
assets: '*.*'

- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.GPG_SECRET }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}

- name: Sign Files for Draft Release
run: |
gpg -K
version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
./.github/sign_artifact.sh ./target/${{ env.artifact_id }}-${version}.pom
- name: Attach Files to Draft Release
id: upload-release-asset
run: ./.github/upload_asset.sh $(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
env:
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
ASSET_NAME_PREFIX: "${{ env.artifact_id }}-"
ASSET_DIR: ./target
attach-artifact-to-release:
uses: liquibase/build-logic/.github/workflows/[email protected]
secrets: inherit

2 changes: 1 addition & 1 deletion .github/workflows/release-published.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ permissions:

jobs:
release:
uses: liquibase/build-logic/.github/workflows/pom-release-published.yml@DAT-15505
uses: liquibase/build-logic/.github/workflows/extension-release-published.yml@v0.4.2
secrets: inherit
15 changes: 14 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>org.liquibase</groupId>
<artifactId>liquibase-parent-pom</artifactId>
<name>Parent POM</name>
<version>0.6.0-SNAPSHOT</version>
<version>0.1.0-SNAPSHOT</version>
<description>Parent POM for all Extensions</description>
<url>https://github.com/liquibase/liquibase-parent-pom</url>
<packaging>pom</packaging>
Expand All @@ -25,6 +25,19 @@
<url>http://www.liquibase.org</url>
</organization>

<developers>
<developer>
<id>nvoxland</id>
<name>Nathan Voxland</name>
<email>[email protected]</email>
<roles>
<role>architect</role>
<role>developer</role>
</roles>
<timezone>-6</timezone>
</developer>
</developers>

<properties>
<!-- Project build properties -->
<maven.compiler.source>1.8</maven.compiler.source>
Expand Down

0 comments on commit 016a64d

Please sign in to comment.