diff --git a/.github/workflows/extension-release-prepare.yml b/.github/workflows/extension-release-prepare.yml index 8f43d6ad..65aa227d 100644 --- a/.github/workflows/extension-release-prepare.yml +++ b/.github/workflows/extension-release-prepare.yml @@ -12,6 +12,8 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v3 + with: + ref: main - name: Set up JDK uses: actions/setup-java@v2 diff --git a/.github/workflows/extension-release-published.yml b/.github/workflows/extension-release-published.yml index d26b7cd5..71d0aed4 100644 --- a/.github/workflows/extension-release-published.yml +++ b/.github/workflows/extension-release-published.yml @@ -32,14 +32,11 @@ jobs: git config user.name "liquibot" git config user.email "liquibot@liquibase.org" - - name: Prepare Maven Release + - 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 }} - - - name: Update branch with latest commits # needed for getting the latest pom.xml generated by release-prepare step - run: | - git pull origin ${{ env.GITHUB_REF_NAME }} - git checkout HEAD~1 + 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 @@ -68,4 +65,9 @@ jobs: -Djavadoc=${{ env.artifact_id }}-${version}-javadoc.jar \ -Dfiles=${{ env.artifact_id }}-${version}.jar.asc,${{ 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,jar.asc,pom.asc \ - -Dclassifiers=,sources,javadoc, \ No newline at end of file + -Dclassifiers=,sources,javadoc, + + release-prepare: + needs: release + uses: liquibase/build-logic/.github/workflows/extension-release-prepare.yml@v0.3.5 + secrets: inherit \ No newline at end of file