@@ -155,3 +155,51 @@ jobs:
155155 MAVEN_USERNAME : ${{ secrets.MAVEN_CENTRAL_USERNAME }}
156156 MAVEN_PASSWORD : ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
157157 GPG_PASS : ${{ secrets.SIGN_KEY_PASS }}
158+
159+ publish-js-provider-release :
160+ needs : release
161+ runs-on : ubuntu-latest
162+ if : ${{ needs.release.outputs.releases_created == 'true' && contains(needs.release.outputs['openfeature-provider-js--release_created'], 'true') }}
163+ steps :
164+ - name : Checkout release tag
165+ uses : actions/checkout@v4
166+ with :
167+ ref : ${{ needs.release.outputs['openfeature-provider-js--tag_name'] }}
168+
169+ - name : Set up Node.js
170+ uses : actions/setup-node@v4
171+ with :
172+ node-version : ' 20.x'
173+ registry-url : ' https://registry.npmjs.org/'
174+
175+ - name : Enable Corepack for Yarn
176+ run : corepack enable
177+
178+ - name : Install dependencies
179+ working-directory : openfeature-provider/js
180+ run : yarn install --immutable
181+
182+ - name : Set up Docker Buildx
183+ uses : docker/setup-buildx-action@v3
184+
185+ - name : Build WASM artifact
186+ uses : docker/build-push-action@v6
187+ with :
188+ context : .
189+ target : wasm-rust-guest.artifact
190+ outputs : type=local,dest=./artifacts
191+
192+ - name : Copy WASM to expected location
193+ run : |
194+ mkdir -p wasm
195+ cp artifacts/confidence_resolver.wasm wasm/confidence_resolver.wasm
196+
197+ - name : Build package
198+ working-directory : openfeature-provider/js
199+ run : yarn build
200+
201+ - name : Publish to npm
202+ working-directory : openfeature-provider/js
203+ run : npm publish --access public
204+ env :
205+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
0 commit comments