Skip to content

Commit 3fd26a7

Browse files
authored
chore: merge preview into release.yml (#4073)
1 parent 0d72f51 commit 3fd26a7

File tree

3 files changed

+18
-68
lines changed

3 files changed

+18
-68
lines changed

.github/workflows/preview.yml

Lines changed: 0 additions & 60 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ on:
44
inputs:
55
version:
66
type: choice
7-
description: 'Release Version (latest)'
7+
description: 'Release Version'
88
required: true
9-
default: 'latest'
9+
default: 'next'
1010
options:
1111
- latest
12+
- next
1213
branch:
1314
description: 'Release Branch (confirm release branch)'
1415
required: true
@@ -52,9 +53,10 @@ jobs:
5253
- name: Install deps
5354
run: pnpm install
5455

55-
- name: Build & publish (next → preview)
56+
- name: Generate preview version
5657
if: github.event.inputs.version == 'next'
5758
run: |
59+
npx changeset version --snapshot next
5860
5961
- name: Build and test Packages
6062
run: |
@@ -63,6 +65,12 @@ jobs:
6365
npx nx run-many --targets=build --projects=tag:type:metro
6466
ls -l packages/*/dist packages/*/package.json
6567
66-
- name: Publish to npm
68+
- name: Publish latest version
69+
if: github.event.inputs.version == 'latest'
6770
run: |
6871
pnpm -r publish --tag ${{ github.event.inputs.version }} --publish-branch ${{ github.event.inputs.branch }}
72+
73+
- name: Publish preview version
74+
if: github.event.inputs.version == 'next'
75+
run: |
76+
pnpm -r publish --tag next --no-git-checks

CONTRIBUTING.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,15 +136,17 @@ Repository maintainers can publish a new version of changed packages to npm.
136136
2. Run `pnpm changeset version` in the package directory to update the version of each package.
137137
3. Create a pull request, the title should be `release v0.19.1`.
138138
4. Run the [release action](https://github.com/module-federation/core/actions/workflows/release.yml) to publish packages to npm.
139-
5. Wait reviewers to approve.
140-
6. Merge the release pull request to `main`.
139+
5. Select `latest` as the release version.
140+
6. Wait reviewers to approve.
141+
7. Merge the release pull request to `main`.
141142
7. Generate the [release notes](https://github.com/module-federation/core/releases) via GitHub, see [Automatically generated release notes](https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes)
142143

143144
## Release preview version
144145

145146
1. Make sure your branch has added changeset files before releasing the preview version.
146-
2. Run the [preview action](https://github.com/module-federation/core/actions/workflows/preview.yml) to publish preview packages.
147-
147+
2. Run the [release action](https://github.com/module-federation/core/actions/workflows/release.yml) to publish packages to npm.
148+
3. Select `next` as the release version.
149+
4. Wait reviewers to approve.
148150

149151

150152
## Release the official version

0 commit comments

Comments
 (0)