Skip to content

Commit 1f39da5

Browse files
authored
Prep infra for v7 release (#2607)
* Prep infra for v7 release * Update workflow name * Clarify release process instructions * Move publish commands into workflow and out of package.json * Prerelease version should include merged tags * Update release procedure to reflect the user pushing the release tag * Fix build * Remove errant yml
1 parent ce335a0 commit 1f39da5

File tree

5 files changed

+60
-14
lines changed

5 files changed

+60
-14
lines changed

.github/workflows/prerelease.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ jobs:
4141
- run: pnpm test
4242

4343
- name: run publish
44-
run: pnpm run publish:prerelease
44+
run: lerna publish minor --canary --include-merged-tags --force-publish --dist-tag prerelease --ignore-scripts true --yes
4545
env:
4646
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/release.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Publish release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*.*.*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build:
13+
strategy:
14+
fail-fast: true
15+
matrix:
16+
node:
17+
- 18
18+
platform:
19+
- ubuntu-latest
20+
name: "${{matrix.platform}} / Node.js ${{ matrix.node }}"
21+
runs-on: ${{matrix.platform}}
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
27+
28+
- uses: pnpm/[email protected]
29+
with:
30+
version: 8
31+
32+
- name: Use Node.js ${{ matrix.node-version }}
33+
uses: actions/setup-node@v4
34+
with:
35+
node-version: ${{ matrix.node-version }}
36+
registry-url: "https://registry.npmjs.org"
37+
cache: "pnpm"
38+
39+
- run: npm whoami
40+
env:
41+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
42+
43+
- run: pnpm install --frozen-lockfile
44+
45+
- run: pnpm test
46+
47+
- name: run publish
48+
run: lerna publish from-package --ignore-scripts true --yes
49+
env:
50+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
51+
52+
- name: Create Github Release
53+
uses: softprops/action-gh-release@v2

.github/workflows/turf.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Turf.js CI
1+
name: CI build
22

33
on:
44
push:

CONTRIBUTING.md

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -95,17 +95,11 @@ it will create a new folder inside `packages` with a simple boilerplate for your
9595
- The version number is calculated by a combination of the output of `git describe` and the `publish:prerelease` script in the root package.json. Specifically having `major` is appropriate for the pre-7.0 development phase, but we should change it to `minor` after 7.0.0 is finally released.
9696

9797
### Release
98-
- create new branch with some name
99-
- write up changelog changes (manually), commit that
100-
- make PR (don't merge)
101-
- pnpm lerna version --no-push 7.0.0
102-
- git push origin --follow-tags \$branch
103-
- merge PR (do not squash or the tags won't transfer)
104-
- re-fetch the new master and check it out locally
105-
- git clean -fdx (this will delete any unsaved local changes!)
106-
- pnpm install
107-
- pnpm test
108-
- pnpm publish -r
98+
- If necessary, make and merge a PR to contain any last minute changelog entries or other housekeeping items
99+
- Make a PR that contains the file changes from `pnpm lerna version --no-push 7.0.0` (update the version as necessary)
100+
- When pushing the release PR, use `--follow-tags` to make sure the relevant tag is also pushed
101+
- The CI will start doing the release when the tag is created
102+
- Don't forget to merge your PR
109103

110104
## Documentation
111105

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
"lint:prettier": "prettier --check .",
1414
"preinstall": "npx only-allow pnpm",
1515
"prepare": "lerna run build && husky install",
16-
"publish:prerelease": "lerna publish --force-publish --canary major --dist-tag prerelease --ignore-scripts true --yes",
1716
"test": "pnpm run lint && lerna run test && lerna run --scope @turf/turf last-checks"
1817
},
1918
"lint-staged": {

0 commit comments

Comments
 (0)