Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 0 additions & 51 deletions .github/workflows/preview.yml

This file was deleted.

44 changes: 18 additions & 26 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,29 +25,23 @@ jobs:
name: Release
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'push' }}
runs-on: ubuntu-latest
environment: npm
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v3
with:
fetch-depth: 25

- name: Install Pnpm
run: |
corepack prepare pnpm@8.11.0 --activate
corepack enable

- name: Setup Node.js 18
uses: actions/setup-node@v4
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'pnpm'

# Update npm to the latest version to enable OIDC
# Use corepack to install pnpm
- name: Setup Package Managers
run: |
npm install -g npm@latest
npm --version
npm install -g corepack@latest --force
corepack prepare pnpm@8.11.0 --activate
corepack enable

- name: Install deps
run: pnpm install

Expand All @@ -57,17 +51,15 @@ jobs:
npx nx run-many --targets=build --projects=tag:type:pkg --skip-nx-cache
ls -l packages/*/dist packages/*/package.json

- uses: actions/github-script@v7
id: version_to_release
- name: Release
uses: module-federation/actions@v2
with:
result-encoding: string
script: |
const fs = require('fs');
const packageJson = JSON.parse(fs.readFileSync('./packages/runtime/package.json', 'utf8'));
return 'v' + packageJson.version;

- name: Publish to npm
run: |
git tag ${{ steps.version_to_release.outputs.result }}
git push origin ${{ steps.version_to_release.outputs.result }}
pnpm -r publish --tag ${{ github.event.inputs.npm_tag }} --publish-branch ${{ github.event.inputs.branch }}
version: ${{ github.event.inputs.version || 'next' }}
branch: ${{ github.event.inputs.branch }}
type: 'release'
tools: 'changeset'
env:
GITHUB_TOKEN: ${{ secrets.REPO_SCOPED_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
REPOSITORY: ${{ github.repository }}
REF: ${{ github.ref }}
1 change: 1 addition & 0 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
},
"publishConfig": {
"access": "public",
"provenance": true,
"registry": "https://registry.npmjs.org/"
}
}
1 change: 1 addition & 0 deletions packages/rsbuild-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
},
"publishConfig": {
"access": "public",
"provenance": true,
"registry": "https://registry.npmjs.org/"
}
}