Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: enable manual running of release #772

Merged
merged 14 commits into from
Sep 5, 2023
3 changes: 3 additions & 0 deletions .github/scripts/prepare_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ set -e
releaseLevel="$1"

npx lerna version "$releaseLevel" --conventional-commits --no-push --no-git-tag-version --yes
version=$(node -pe 'require("./lerna.json").version')
jq '.version = $newVer' --arg newVer "$version" package.json > tmp
mv tmp package.json
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any particular reason why we're bumping the root package json? Lerna only bumps packages we're publishing or care about

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm trying not to change the action while work on it is being done, so this is needed. The action assumes that the top level package.json is the source of truth for what version the package is.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR for not doing this is in api-team-public

12 changes: 10 additions & 2 deletions .github/workflows/auto-patch-release.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
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 }}
project_token: ${{ secrets.GH_PROJECT_TOKEN }}
skip_checks: ${{ steps.skip-checks.outputs.value }}
slack_webhook: ${{ secrets.SLACK_WEBHOOK }}
odd_release: 'true'
release-command: bash .github/scripts/prepare_release.sh
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "axe-core-npm",
"version": "4.7.3",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment above

"private": true,
"license": "MPL-2.0",
"scripts": {
Expand Down