Skip to content

Commit

Permalink
ci(build.yaml): support N.x branches to patch previous release
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Guerrero authored and gabrielguerrero committed Mar 21, 2024
1 parent ccf8a4f commit efd1445
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: Node.js CI

on:
push:
branches: [ main, next, beta ]
branches: [ main, next, beta, '*.x' ]
pull_request:
branches: '*'

Expand All @@ -32,7 +32,8 @@ jobs:

publish:
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/next' || github.ref == 'refs/heads/beta' }}
# only allows semantic release on main, next, beta, and 1*x branches, github doesnt do regex matching so we have to manually when we are over version 20
if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/next' || github.ref == 'refs/heads/beta' || (startsWith(github.ref, 'refs/heads/1') && endsWith(github.ref, '.x')) }}
needs: [quality]
steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .releaserc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"branches": ["main", "next", {"name": "beta", "prerelease": true}],
"branches": ['+([0-9])?(.{+([0-9]),x}).x', "main", "next", {"name": "beta", "prerelease": true}],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
Expand Down

0 comments on commit efd1445

Please sign in to comment.