@@ -25,29 +25,23 @@ jobs:
2525 name : Release
2626 if : ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'push' }}
2727 runs-on : ubuntu-latest
28- environment : npm
2928 steps :
3029 - name : Checkout
31- uses : actions/checkout@v4
30+ uses : actions/checkout@v3
3231 with :
3332 fetch-depth : 25
3433
34+ - name : Install Pnpm
35+ run : |
36+ corepack prepare [email protected] --activate 37+ corepack enable
38+
3539 - name : Setup Node.js 18
36- uses : actions/setup-node@v4
40+ uses : actions/setup-node@v3
3741 with :
3842 node-version : ' 18'
3943 cache : ' pnpm'
4044
41- # Update npm to the latest version to enable OIDC
42- # Use corepack to install pnpm
43- - name : Setup Package Managers
44- run : |
45- npm install -g npm@latest
46- npm --version
47- npm install -g corepack@latest --force
48- corepack prepare [email protected] --activate 49- corepack enable
50-
5145 - name : Install deps
5246 run : pnpm install
5347
@@ -57,17 +51,15 @@ jobs:
5751 npx nx run-many --targets=build --projects=tag:type:pkg --skip-nx-cache
5852 ls -l packages/*/dist packages/*/package.json
5953
60- - uses : actions/github-script@v7
61- id : version_to_release
54+ - name : Release
55+ uses : module-federation/actions@v2
6256 with :
63- result-encoding : string
64- script : |
65- const fs = require('fs');
66- const packageJson = JSON.parse(fs.readFileSync('./packages/runtime/package.json', 'utf8'));
67- return 'v' + packageJson.version;
68-
69- - name : Publish to npm
70- run : |
71- git tag ${{ steps.version_to_release.outputs.result }}
72- git push origin ${{ steps.version_to_release.outputs.result }}
73- pnpm -r publish --tag ${{ github.event.inputs.npm_tag }} --publish-branch ${{ github.event.inputs.branch }}
57+ version : ${{ github.event.inputs.version || 'next' }}
58+ branch : ${{ github.event.inputs.branch }}
59+ type : ' release'
60+ tools : ' changeset'
61+ env :
62+ GITHUB_TOKEN : ${{ secrets.REPO_SCOPED_TOKEN }}
63+ NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
64+ REPOSITORY : ${{ github.repository }}
65+ REF : ${{ github.ref }}
0 commit comments