v1.0.0 #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | ||
# yamllint disable rule:line-length | ||
name: "Publish to NPM" | ||
on: # yamllint disable-line rule:truthy | ||
release: | ||
types: | ||
- "published" | ||
jobs: | ||
publish: | ||
name: Publish to NPM | ||
needs: | ||
- test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
- uses: bahmutov/npm-install@v1 | ||
- run: yarn test | ||
- uses: battila7/get-version-action@v2 | ||
# Set the version in package.json to match the tag | ||
- run: "npm version ${{ steps.get_version.outputs.version-without-v }}" | ||
- uses: JS-DevTools/npm-publish@v3 | ||
with: | ||
token: ${{ secrets.NPM_TOKEN }} | ||
tag: ${{ steps.get_version.outputs.version }} | ||
access: public | ||
# NOTE: this publishes an alternate version that doesn't depend on protobuf-ts/runtime | ||
publish-js-client: | ||
name: Publish JS client to NPM | ||
needs: build-js-client | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download js client build | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: js-client-18 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
- uses: bahmutov/npm-install@v1 | ||
- uses: battila7/get-version-action@v2 | ||
# Set the version in package.json to match the tag | ||
- run: "npm version ${{ steps.get_version.outputs.version-without-v }}" | ||
- uses: JS-DevTools/npm-publish@v3 | ||
with: | ||
token: ${{ secrets.NPM_TOKEN }} | ||
tag: ${{ steps.get_version.outputs.version }} | ||
access: public |