diff --git a/.github/settings.yml b/.github/settings.yml index 87e6c55..37c2cd3 100644 --- a/.github/settings.yml +++ b/.github/settings.yml @@ -49,7 +49,7 @@ teams: permission: push branches: - - name: main + - &default_protection # https://developer.github.com/v3/repos/branches/#update-branch-protection # Branch Protection settings. Set to null to disable protection: @@ -70,11 +70,19 @@ branches: # Required. Require branches to be up to date before merging. strict: true # Required. The list of status checks to require in order to merge into this branch - contexts: ["test (18.x)", "license/cla"] + contexts: ["test (18.x)", "test (20.x)", "license/cla"] # Required. Enforce all configured restrictions for administrators. Set to true to enforce required status checks for repository administrators. Set to null to disable. enforce_admins: false # Required. Restrict who can push to this branch. Team and user restrictions are only available for organization-owned repositories. Set to null to disable. restrictions: null + # Prevent merge commits from being pushed to matching branches + required_linear_history: true + + - name: main + <<: *default_protection + + - name: beta + <<: *default_protection # Labels: define labels for Issues and Pull Requests labels: diff --git a/.github/workflows/testPublish.yml b/.github/workflows/testPublish.yml index c2a7487..87db9c7 100644 --- a/.github/workflows/testPublish.yml +++ b/.github/workflows/testPublish.yml @@ -29,7 +29,7 @@ jobs: release: # Only release on push to main - if: github.event_name == 'push' && github.ref == 'refs/heads/main' + if: github.event_name == 'push' && github.ref == 'refs/heads/main' || 'refs/heads/beta' runs-on: ubuntu-latest needs: test steps: diff --git a/package.json b/package.json index 975b27c..5b410a9 100644 --- a/package.json +++ b/package.json @@ -96,7 +96,13 @@ }, "release": { "branches": [ - "main" + { + "name": "main" + }, + { + "name": "beta", + "prerelease": true + } ], "plugins": [ "@semantic-release/commit-analyzer",