Skip to content

Commit eb0f519

Browse files
authored
Prepare the release workflow for the branch-per-major model (#75)
1 parent f330e04 commit eb0f519

2 files changed

Lines changed: 43 additions & 5 deletions

File tree

.github/workflows/main.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Main
22

33
on:
44
push:
5-
branches: [main]
5+
branches: [main, '[0-9]+.x']
66
pull_request:
7-
branches: [main]
7+
branches: [main, '[0-9]+.x']
88

99
concurrency:
1010
group: main-${{ github.workflow }}-${{ github.ref }}
@@ -17,6 +17,7 @@ env:
1717
# Among other things, opts out of Turborepo telemetry. See https://consoledonottrack.com/.
1818
DO_NOT_TRACK: '1'
1919
NODE_VERSION: 24
20+
RELEASE_VERSION: 1.x
2021
SOLANA_VERSION: 2.1.9
2122

2223
jobs:
@@ -80,7 +81,7 @@ jobs:
8081
release:
8182
name: Release
8283
runs-on: ubuntu-latest
83-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
84+
if: github.event_name == 'push'
8485
needs: [lint, tests]
8586
permissions:
8687
contents: write
@@ -118,8 +119,8 @@ jobs:
118119
uses: changesets/action@v2.1.1
119120
with:
120121
github-token: ${{ steps.app-token.outputs.token }}
121-
commit-message: 'Publish package'
122-
pr-title: 'Publish package'
122+
commit-message: '[${{ env.RELEASE_VERSION }}] Publish package'
123+
pr-title: '[${{ env.RELEASE_VERSION }}] Publish package'
123124
publish-script: pnpm publish-package
124125
env:
125126
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

CONTRIBUTING.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Contributing
2+
3+
Thanks for your interest in contributing to `@codama/renderers-js-umi`.
4+
5+
## Getting set up
6+
7+
You'll need Node.js and pnpm (see `engines` and `packageManager` in
8+
`package.json`). Then:
9+
10+
```sh
11+
pnpm install
12+
pnpm build
13+
pnpm test
14+
pnpm lint
15+
```
16+
17+
## Declaring release intent
18+
19+
Any PR that ships a change to npm needs a changeset:
20+
21+
```sh
22+
pnpm changeset
23+
```
24+
25+
Pick the bump level (`patch` / `minor` / `major`), write a short user-facing
26+
summary, and commit the resulting `.changeset/*.md` alongside your code.
27+
28+
## Releasing
29+
30+
Patch and minor releases are automated: merging a PR with a changeset into
31+
`main` makes the release workflow open (or update) a release PR, and merging
32+
that release PR publishes the package to npm.
33+
34+
Major releases follow the ecosystem-wide process described in the spec
35+
repository's [RELEASING.md](https://github.com/codama-idl/spec/blob/HEAD/RELEASING.md)
36+
(branch model, npm dist-tag conventions, release candidates, the bake window,
37+
and the cross-repo release train).

0 commit comments

Comments
 (0)