From 8789b9d9de2799e68051c998a40aea6163c1d3eb Mon Sep 17 00:00:00 2001 From: AdnoC Date: Thu, 24 Aug 2023 12:54:29 -0400 Subject: [PATCH 1/7] ci: enable manual run of patch release --- .github/workflows/auto-patch-release.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/auto-patch-release.yml b/.github/workflows/auto-patch-release.yml index 8e5b4f43..84ee5cf1 100644 --- a/.github/workflows/auto-patch-release.yml +++ b/.github/workflows/auto-patch-release.yml @@ -1,17 +1,25 @@ name: Automatically create patch release every 2 weeks on: schedule: - # Run every Friday right before midnight - - cron: '59 23 * * 5' + # Run every Thursday right before midnight + - cron: '59 23 * * 4' + workflow_dispatch: jobs: create_patch_release: name: Create release runs-on: ubuntu-latest steps: + - name: Determine if we skip cancel checks + id: skip-checks + shell: bash + # Skip checks if we are not a scheduled run + run: echo value=$(test ${{ github.event_name }} != schedule && echo true || echo false) >> "$GITHUB_OUTPUT" + - name: Create release uses: dequelabs/axe-api-team-public/.github/actions/auto-patch-release-v1@main with: token: ${{ secrets.GITHUB_TOKEN }} + skip_checks: ${{ steps.skip-checks.outputs.value }} project_token: ${{ secrets.GH_PROJECT_TOKEN }} slack_webhook: ${{ secrets.SLACK_WEBHOOK }} odd_release: 'true' From 5fd60718d798b8274eab286b8877eee215fccb65 Mon Sep 17 00:00:00 2001 From: AdnoC Date: Thu, 24 Aug 2023 12:55:17 -0400 Subject: [PATCH 2/7] TEST --- .github/workflows/auto-patch-release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/auto-patch-release.yml b/.github/workflows/auto-patch-release.yml index 84ee5cf1..c16a6952 100644 --- a/.github/workflows/auto-patch-release.yml +++ b/.github/workflows/auto-patch-release.yml @@ -4,6 +4,7 @@ on: # Run every Thursday right before midnight - cron: '59 23 * * 4' workflow_dispatch: + pull_request: jobs: create_patch_release: name: Create release From 21e2835b8e266d0ecfc0091b0761dd2fd0e5aa21 Mon Sep 17 00:00:00 2001 From: AdnoC Date: Thu, 24 Aug 2023 12:58:00 -0400 Subject: [PATCH 3/7] add prep_release --- .github/scripts/prepare_release.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/scripts/prepare_release.sh diff --git a/.github/scripts/prepare_release.sh b/.github/scripts/prepare_release.sh new file mode 100644 index 00000000..0945d5c8 --- /dev/null +++ b/.github/scripts/prepare_release.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# Fail on first error. +set -e + +releaseLevel="$1" + +oldVersion="$(node -pe 'require("./package.json").version')" +npx standard-version@"$STD_VERSION_VERSION" --release-as "$releaseLevel" --skip.commit=true --skip.changelog=true --skip.tag=true +newVersion="$(node -pe 'require("./package.json").version')" + +sed -i -e "s/ VERSION\\s*=\\s*\"$oldVersion\"/ VERSION = \"$newVersion\"/" version.rb + +npx conventional-changelog-cli@"$CHANGELOG_VERSION" -p angular -i CHANGELOG.md -s From 60f4b816281cd3d59c88c90bd24c22788c18c860 Mon Sep 17 00:00:00 2001 From: AdnoC Date: Thu, 24 Aug 2023 12:59:48 -0400 Subject: [PATCH 4/7] TEST: base off this branch to see new prep release --- .github/workflows/auto-patch-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/auto-patch-release.yml b/.github/workflows/auto-patch-release.yml index c16a6952..8cceeba3 100644 --- a/.github/workflows/auto-patch-release.yml +++ b/.github/workflows/auto-patch-release.yml @@ -26,4 +26,4 @@ jobs: odd_release: 'true' release-command: bash .github/scripts/prepare_release.sh release-branch: master - default-branch: develop + default-branch: ci-patch-manual From ff8fb3908de88e27fccf84de90619fde4526fc7a Mon Sep 17 00:00:00 2001 From: AdnoC Date: Thu, 24 Aug 2023 13:03:13 -0400 Subject: [PATCH 5/7] Revert "TEST: base off this branch to see new prep release" This reverts commit 60f4b816281cd3d59c88c90bd24c22788c18c860. --- .github/workflows/auto-patch-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/auto-patch-release.yml b/.github/workflows/auto-patch-release.yml index 8cceeba3..c16a6952 100644 --- a/.github/workflows/auto-patch-release.yml +++ b/.github/workflows/auto-patch-release.yml @@ -26,4 +26,4 @@ jobs: odd_release: 'true' release-command: bash .github/scripts/prepare_release.sh release-branch: master - default-branch: ci-patch-manual + default-branch: develop From 6d22b87db946f9084f5f2ae11a1f202fdd0bf700 Mon Sep 17 00:00:00 2001 From: AdnoC Date: Thu, 24 Aug 2023 13:03:21 -0400 Subject: [PATCH 6/7] Revert "TEST" This reverts commit 5fd60718d798b8274eab286b8877eee215fccb65. --- .github/workflows/auto-patch-release.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/auto-patch-release.yml b/.github/workflows/auto-patch-release.yml index c16a6952..84ee5cf1 100644 --- a/.github/workflows/auto-patch-release.yml +++ b/.github/workflows/auto-patch-release.yml @@ -4,7 +4,6 @@ on: # Run every Thursday right before midnight - cron: '59 23 * * 4' workflow_dispatch: - pull_request: jobs: create_patch_release: name: Create release From ac92f4fe2b476e36076612629578efca390c6925 Mon Sep 17 00:00:00 2001 From: Adam Cutler Date: Wed, 6 Sep 2023 17:34:55 -0400 Subject: [PATCH 7/7] Single stage prep release --- .github/scripts/prepare_release.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/scripts/prepare_release.sh b/.github/scripts/prepare_release.sh index 0945d5c8..594f5e21 100644 --- a/.github/scripts/prepare_release.sh +++ b/.github/scripts/prepare_release.sh @@ -6,9 +6,7 @@ set -e releaseLevel="$1" oldVersion="$(node -pe 'require("./package.json").version')" -npx standard-version@"$STD_VERSION_VERSION" --release-as "$releaseLevel" --skip.commit=true --skip.changelog=true --skip.tag=true +npx standard-version --release-as "$releaseLevel" --skip.commit=true --skip.tag=true newVersion="$(node -pe 'require("./package.json").version')" sed -i -e "s/ VERSION\\s*=\\s*\"$oldVersion\"/ VERSION = \"$newVersion\"/" version.rb - -npx conventional-changelog-cli@"$CHANGELOG_VERSION" -p angular -i CHANGELOG.md -s