Skip to content

Commit

Permalink
build: update to support BETA releases
Browse files Browse the repository at this point in the history
https://github.com/orgs/AlaskaAirlines/discussions/556

This code diff represents changes made to multiple files in a Git repository. Let's break it down:

1. `.github/settings.yml`:
   - Line 38: The `branches` section is modified. The `name` field for the `master` branch is removed, and a new field `&default_protection` is added.
   - Line 59: The `contexts` field under `required_status_checks` is modified. The duplicate word `contexts` is removed.
   - Line 67: Two new branches, `master` and `beta`, are added with the same `&default_protection` settings.

2. `.github/workflows/testPublish.yml`:
   - Line 29: The condition for the `release` job is modified. It will now trigger on a push event to either the `master` branch or the `beta` branch.

3. `package.json`:
   - Line 71: The `release` section is modified. The `branch` field is replaced with an array of `branches`. The `main` branch is added, and the `beta` branch is added as a prerelease branch.

These changes include modifications to branch protection settings, the addition of new branches, and changes to the release workflow configuration.

Changes to be committed:
modified:   .github/settings.yml
modified:   .github/workflows/testPublish.yml
modified:   package.json
  • Loading branch information
blackfalcon committed Jun 17, 2024
1 parent b086b11 commit 58d3f7b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
10 changes: 8 additions & 2 deletions .github/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
allow_rebase_merge: true

branches:
- name: master
- &default_protection
# https://developer.github.com/v3/repos/branches/#update-branch-protection
# Branch Protection settings. Set to null to disable
protection:
Expand All @@ -59,14 +59,20 @@ 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: contexts: ["test (18.x)", "test (20.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: master
<<: *default_protection

- name: beta
<<: *default_protection

# Labels: define labels for Issues and Pull Requests
labels:
- name: auro-wcss
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/testPublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

release:
# Only release on push to master
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
if: github.event_name == 'push' && github.ref == 'refs/heads/master' || 'refs/heads/beta'
runs-on: ubuntu-latest
needs: test
steps:
Expand Down
10 changes: 9 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,15 @@
]
},
"release": {
"branch": "master",
"branches": [
{
"name": "main"
},
{
"name": "beta",
"prerelease": true
}
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
Expand Down

0 comments on commit 58d3f7b

Please sign in to comment.