Skip to content

Commit

Permalink
chore: skip pre-commit hooks when creating a release
Browse files Browse the repository at this point in the history
  • Loading branch information
carlmw committed Feb 27, 2024
1 parent 468d0e1 commit cc3ddbe
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
name: Release
on:
workflow_run:
workflows: Verify
branches: main
types: completed
push:
branches:
- main
- next

permissions:
contents: read # for checkout

jobs:
release:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
name: Release
runs-on: ubuntu-latest
permissions:
Expand All @@ -35,4 +34,6 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
HUSKY: 0
CI: true
run: npx semantic-release
1 change: 1 addition & 0 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- next
pull_request:
types: [opened, synchronize, reopened]

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@
"homepage": "https://github.com/oaknational/oak-components#readme",
"release": {
"branches": [
"main"
"main",
"next"
],
"plugins": [
"@semantic-release/commit-analyzer",
Expand Down
5 changes: 5 additions & 0 deletions scripts/prepublish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

echo "pre-publish"

if [ "$CI" = "true" ]; then
echo "Skipping pre-publish checks on CI"
exit 0
fi;

branch="$(git rev-parse --abbrev-ref HEAD)"

if [ "$branch" != "main" ]; then
Expand Down

0 comments on commit cc3ddbe

Please sign in to comment.