@@ -25,29 +25,23 @@ jobs:
25
25
name : Release
26
26
if : ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'push' }}
27
27
runs-on : ubuntu-latest
28
- environment : npm
29
28
steps :
30
29
- name : Checkout
31
- uses : actions/checkout@v4
30
+ uses : actions/checkout@v3
32
31
with :
33
32
fetch-depth : 25
34
33
34
+ - name : Install Pnpm
35
+ run : |
36
+ corepack prepare [email protected] --activate
37
+ corepack enable
38
+
35
39
- name : Setup Node.js 18
36
- uses : actions/setup-node@v4
40
+ uses : actions/setup-node@v3
37
41
with :
38
42
node-version : ' 18'
39
43
cache : ' pnpm'
40
44
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
-
51
45
- name : Install deps
52
46
run : pnpm install
53
47
@@ -57,17 +51,15 @@ jobs:
57
51
npx nx run-many --targets=build --projects=tag:type:pkg --skip-nx-cache
58
52
ls -l packages/*/dist packages/*/package.json
59
53
60
- - uses : actions/github-script@v7
61
- id : version_to_release
54
+ - name : Release
55
+ uses : module-federation/actions@v2
62
56
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