Skip to content

Commit af808dd

Browse files
authored
Prepare main branch for v3 alpha (#1225)
1 parent 4b290c0 commit af808dd

11 files changed

Lines changed: 80 additions & 17 deletions

File tree

.ado/publish.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,12 @@ extends:
109109
displayName: Test
110110

111111
# TODO: figure out if this should bump or not (currently does bump)
112+
# and currently uses a prerelease prefix of 'test' to avoid interfering with real versions
113+
# TODO (release): change back to:
114+
# yarn beachball publish --prerelease-prefix test -y --no-push --pack-to-path '$(Build.StagingDirectory)/pkg'
112115
- script: |
113-
yarn beachball publish -y --no-push --pack-to-path '$(Build.StagingDirectory)/pkg'
114-
displayName: 'Pack packages'
116+
yarn release:canary --no-push --pack-to-path '$(Build.StagingDirectory)/pkg'
117+
displayName: 'Pack packages (canary)'
115118
116119
- script: |
117120
ls -R '$(Build.StagingDirectory)/pkg'

.github/pull_request_template.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<!--
2+
The `main` branch of beachball is currently being used for development of a new major version. If this is a non-breaking change which you'd like to pick up right away in beachball v2, it should target the `v2` branch instead of `main`.
3+
-->
4+
5+
<!-- Don't forget to include a change file! -->

.github/workflows/docsite.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ name: Update documentation site
22

33
on:
44
push:
5-
branches: [main]
5+
# The docsite publishes from the v2 branch for now
6+
branches: [v2]
67
paths:
78
- 'docs/**'
89
- .github/workflows/docsite.yml
@@ -23,6 +24,14 @@ jobs:
2324
- name: Check out code
2425
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
2526

27+
# TODO (release): release from main
28+
- name: Verify v2 branch
29+
run: |
30+
if [[ "${GITHUB_REF}" != "refs/heads/v2" ]]; then
31+
echo "Releases can only be triggered from the v2 branch."
32+
exit 1
33+
fi
34+
2635
# The docs have a separate installation using Node 22 due to needing newer dependencies
2736
- name: Install Node.js
2837
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6

.github/workflows/pr.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
1-
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3-
41
name: PR
52

63
on:
74
pull_request:
8-
branches: [main]
5+
branches: [main, v2]
96
push:
10-
branches: [main]
7+
branches: [main, v2]
118

129
concurrency:
1310
# For PRs, use the ref (branch) in the concurrency group so that new pushes cancel any old runs.
1411
# For pushes to main, ideally we wouldn't set a concurrency group, but github actions doesn't
1512
# support conditional blocks of settings, so we use the SHA so the "group" is unique.
16-
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.sha || github.ref }}
13+
group: ${{ github.workflow }}-${{ (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/v2') && github.sha || github.ref }}
1714
cancel-in-progress: true
1815

1916
permissions: {}

.github/workflows/release.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ jobs:
3434
# Don't save creds in the git config (so it's easier to override later)
3535
persist-credentials: false
3636

37+
# Prereleases from main are disabled until the canary/prerelease flow is fixed
38+
- name: Verify v2 branch
39+
run: |
40+
if [[ "${GITHUB_REF}" != "refs/heads/v2" ]]; then
41+
echo "Releases can only be triggered from the v2 branch."
42+
exit 1
43+
fi
44+
3745
- name: Install Node.js ${{ env.nodeVersion }}
3846
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
3947
with:
@@ -48,7 +56,8 @@ jobs:
4856

4957
- run: yarn test --verbose
5058

51-
- name: Publish package
59+
# TODO (release): switch back to regular release
60+
- name: Publish package (canary)
5261
run: |
5362
git config user.email "kchau@microsoft.com"
5463
git config user.name "Ken Chau"
@@ -60,6 +69,6 @@ jobs:
6069
# Add a token to the remote URL for auth during release
6170
git remote set-url origin "https://$REPO_PAT@github.com/$GITHUB_REPOSITORY"
6271
63-
yarn release
72+
yarn release:canary
6473
env:
6574
REPO_PAT: ${{ secrets.REPO_PAT }}

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
# [beachball](https://microsoft.github.io/beachball/) monorepo
22

33
the sunniest version bumping tool - see [`packages/beachball`](./packages/beachball) for details
4+
5+
## `main` is currently the development branch for beachball v3 (alpha)
6+
7+
The code for beachball v2 (`latest`) is in the `v2` branch. If you're making a PR with a non-breaking change, it should target the `v2` branch.

beachball.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@ const config = {
44
access: 'public',
55
branch: 'main',
66
commit: false,
7-
disallowedChangeTypes: ['major'],
87
groupChanges: true,
98
ignorePatterns: ['.*ignore', '.eslintrc.js', 'jest.*.js', 'src/__*/**'],
9+
// TODO (release): change back to major
10+
disallowedChangeTypes: ['prerelease'],
11+
// TODO (release): remove
12+
canaryName: 'alpha',
1013
};
1114

1215
module.exports = config;
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"changes": [
3+
{
4+
"type": "none",
5+
"comment": "Start preparing for v3 release",
6+
"packageName": "beachball",
7+
"email": "elcraig@microsoft.com",
8+
"dependentChangeType": "none"
9+
}
10+
]
11+
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"lint:versions": "yarn syncpack:check",
3434
"lint:marketplace": "node scripts/lintMarketplace.js",
3535
"postinstall": "patch-package",
36-
"release": "yarn beachball publish -y",
36+
"release:canary": "yarn beachball canary -y",
3737
"release:docs": "echo \"Run this from the docs folder instead\" && exit 1",
3838
"syncpack:check": "syncpack list-mismatches",
3939
"syncpack:update": "syncpack fix-mismatches",

packages/beachball/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "beachball",
3-
"version": "2.65.3",
3+
"version": "3.0.0-alpha.0",
44
"description": "The Sunniest Semantic Version Bumper",
55
"repository": {
66
"type": "git",

0 commit comments

Comments
 (0)