From 7931fceeab1182b4b84e3acd7f9adeddac3bc6e3 Mon Sep 17 00:00:00 2001 From: Simon Thulbourn Date: Fri, 13 Jun 2025 08:17:04 +0000 Subject: [PATCH 1/4] chore(ci): Make v2 the main branch --- .github/auto_assign-issues.yml | 9 --------- .github/workflows/check-build.yml | 1 - .github/workflows/check-e2e.yml | 1 - .github/workflows/check-spotbugs.yml | 2 +- .github/workflows/release-drafter.yml | 5 ----- .github/workflows/release.yml | 2 +- .github/workflows/security-branch-protections.yml | 2 +- .github/workflows/security-dependabot.yml | 2 +- .github/workflows/security-osv.yml | 2 -- 9 files changed, 4 insertions(+), 22 deletions(-) delete mode 100644 .github/auto_assign-issues.yml diff --git a/.github/auto_assign-issues.yml b/.github/auto_assign-issues.yml deleted file mode 100644 index fb160ed94..000000000 --- a/.github/auto_assign-issues.yml +++ /dev/null @@ -1,9 +0,0 @@ -addAssignees: true - -# The list of users to assign to new issues. -# If empty or not provided, the repository owner is assigned -assignees: - - scottgerring - - jeromevdl - - mriccia - - msailes diff --git a/.github/workflows/check-build.yml b/.github/workflows/check-build.yml index cc5931d05..b5fe372dc 100644 --- a/.github/workflows/check-build.yml +++ b/.github/workflows/check-build.yml @@ -38,7 +38,6 @@ on: push: branches: - main - - v2 paths: # add other modules when there are under e2e tests - 'powertools-batch/**' - 'powertools-core/**' diff --git a/.github/workflows/check-e2e.yml b/.github/workflows/check-e2e.yml index 14eab5394..d5c95f156 100644 --- a/.github/workflows/check-e2e.yml +++ b/.github/workflows/check-e2e.yml @@ -15,7 +15,6 @@ on: push: branches: - main - - v2 paths: # add other modules when there are under e2e tests - 'powertools-batch/**' - 'powertools-core/**' diff --git a/.github/workflows/check-spotbugs.yml b/.github/workflows/check-spotbugs.yml index 0749dfaa0..fd76d9560 100644 --- a/.github/workflows/check-spotbugs.yml +++ b/.github/workflows/check-spotbugs.yml @@ -9,7 +9,7 @@ on: pull_request: branches: - - v2 + - main paths: - 'powertools-batch/**' - 'powertools-core/**' diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index f727ee25d..39d453ced 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -15,16 +15,11 @@ name: Release Drafter run-name: Release Drafter jobs: -<<<<<<< HEAD - update_release_draft: - runs-on: ubuntu-latest -======= update_release: runs-on: ubuntu-latest permissions: contents: write id-token: write ->>>>>>> 4a17172a (chore(automation): Update automation workflows (#1779)) steps: - name: Relase Drafter uses: release-drafter/release-drafter@b1476f6e6eb133afa41ed8589daba6dc69b4d3f5 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2fa4770c2..7c2cf00c2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -82,7 +82,7 @@ jobs: - id: base name: Base run: | - echo build_version=$(test ${{ github.ref_name }} == "v2" && echo "v2" || echo "v1") >> $GITHUB_OUTPUT + echo build_version=$(test ${{ github.ref_name }} == "main" && echo "v2" || echo "v1") >> $GITHUB_OUTPUT - id: build_matrix_v1 name: Build matrix (v1) if: ${{ steps.base.outputs.build_version == 'v1' }} diff --git a/.github/workflows/security-branch-protections.yml b/.github/workflows/security-branch-protections.yml index dc7c06316..05a082b0b 100644 --- a/.github/workflows/security-branch-protections.yml +++ b/.github/workflows/security-branch-protections.yml @@ -43,7 +43,7 @@ jobs: # List of branches we want to monitor for protection changes branch: - main - - v2 + - v1 steps: - name: Checkout repository uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 diff --git a/.github/workflows/security-dependabot.yml b/.github/workflows/security-dependabot.yml index 095219045..e1422fb2b 100644 --- a/.github/workflows/security-dependabot.yml +++ b/.github/workflows/security-dependabot.yml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-latest if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'aws-powertools/powertools-lambda-java' }} permissions: - pull-requests: read + pull-requests: write steps: - id: dependabot-metadata name: Fetch Dependabot metadata diff --git a/.github/workflows/security-osv.yml b/.github/workflows/security-osv.yml index b332faae3..67e2e6e3f 100644 --- a/.github/workflows/security-osv.yml +++ b/.github/workflows/security-osv.yml @@ -13,14 +13,12 @@ on: pull_request: branches: - main - - v2 workflow_dispatch: {} schedule: - cron: "30 12 * * 1" push: branches: - main - - v2 name: OpenSource Vulnerability Scanner run-name: OpenSource Vulnerability Scanner From fd7df6ade3bf8b56ca2aeb2642b634bce816ce66 Mon Sep 17 00:00:00 2001 From: Simon Thulbourn Date: Fri, 13 Jun 2025 08:18:37 +0000 Subject: [PATCH 2/4] update runner size for release --- .github/workflows/release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7c2cf00c2..9d531a179 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -123,7 +123,7 @@ jobs: retention-days: 1 quality: - runs-on: ubuntu-latest + runs-on: aws-powertools_ubuntu-latest_8-core needs: - version_seal if: ${{ inputs.skip_checks == false }} @@ -156,7 +156,7 @@ jobs: uploadSarifReport: false build: - runs-on: ubuntu-latest + runs-on: aws-powertools_ubuntu-latest_8-core needs: - setup - quality @@ -183,7 +183,7 @@ jobs: mvn -B install --file pom.xml publish: - runs-on: ubuntu-latest + runs-on: aws-powertools_ubuntu-latest_8-core if: ${{ github.repository == 'aws-powertools/powertools-lambda-java' && inputs.skip_publish == false }} needs: - build From 175ace17123a2e1792092669692af4bb3ac889ee Mon Sep 17 00:00:00 2001 From: Simon Thulbourn Date: Fri, 13 Jun 2025 08:19:17 +0000 Subject: [PATCH 3/4] update skip checks --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9d531a179..46e1f1fb8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -184,7 +184,7 @@ jobs: publish: runs-on: aws-powertools_ubuntu-latest_8-core - if: ${{ github.repository == 'aws-powertools/powertools-lambda-java' && inputs.skip_publish == false }} + if: ${{ github.repository == 'aws-powertools/powertools-lambda-java' && inputs.skip_publish == false && always() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') }} needs: - build environment: Release From 17eba6fce9878e527f93f3bd230d2b21e80e27dc Mon Sep 17 00:00:00 2001 From: Simon Thulbourn Date: Fri, 13 Jun 2025 08:22:17 +0000 Subject: [PATCH 4/4] create tag instead of release --- .github/workflows/release.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 46e1f1fb8..dc462fbfc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -254,11 +254,10 @@ jobs: env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - id: tag - name: Create release + name: Create tag run: | - gh release create v${{ inputs.version }} --target $(git rev-parse HEAD) - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + git tag -a v${{ inputs.version }} -m "Release v${{ inputs.version }}" + git push origin v${{ inputs.version }} docs: runs-on: ubuntu-latest