1+ # Publish @meshsdk/hydra-react to npm when a PR to main is merged and package version was updated.
2+ # Single-package replica of the Mesh monorepo publish workflow.
3+
14name : Publish @meshsdk/hydra-react
25
36on :
@@ -14,30 +17,19 @@ jobs:
1417 matrix :
1518 node-version : [20]
1619 steps :
17- - name : Checkout repository
18- uses : actions/checkout@v4
19-
20+ - uses : actions/checkout@v4
2021 - name : Use Node.js ${{ matrix.node-version }}
2122 uses : actions/setup-node@v4
22- with :
23- node-version : ${{ matrix.node-version }}
24-
2523 - name : Install dependencies
2624 run : npm install
27-
2825 - name : Lint
2926 run : npm run lint
30-
31- - name : Type check
32- run : npm run type-check
33-
34- - name : Build package
27+ - name : Build
3528 run : npm run build:mesh
3629
3730 check-version :
3831 runs-on : ubuntu-latest
3932 if : github.event.pull_request.merged == true
40- needs : build
4133 outputs :
4234 version-updated : ${{ steps.compare-versions.outputs.version-updated }}
4335 steps :
@@ -72,27 +64,17 @@ jobs:
7264 echo "version-updated=false" >> "$GITHUB_OUTPUT"
7365 fi
7466
75- publish-hydra-react :
67+ publish-meshsdk- hydra-react :
7668 needs : [build, check-version]
7769 if : needs.check-version.outputs.version-updated == 'true'
7870 runs-on : ubuntu-latest
7971 steps :
80- - name : Checkout repository
81- uses : actions/checkout@v4
82-
83- - name : Use Node.js 20
84- uses : actions/setup-node@v4
72+ - uses : actions/checkout@v4
73+ - uses : actions/setup-node@v4
8574 with :
8675 node-version : 20
8776 registry-url : https://registry.npmjs.org/
88-
89- - name : Install dependencies and build
90- run : |
91- npm install
92- npm run build:mesh
93-
94- - name : Publish @meshsdk/hydra-react to npm
95- run : npm publish --access public
77+ - run : npm install && npm run build
78+ - run : npm publish --access public
9679 env :
9780 NODE_AUTH_TOKEN : ${{ secrets.npm_token }}
98-
0 commit comments