v18.0.1 #46
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
name: Publish Typescript to NPM | |
on: | |
workflow_dispatch: | |
release: | |
types: [created] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '20.x' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Install buf | |
run: | | |
curl -sSL https://github.com/bufbuild/buf/releases/download/v1.28.1/buf-Linux-x86_64 -o /usr/local/bin/buf | |
chmod +x /usr/local/bin/buf | |
- name: Generate | |
run: | | |
make typescript | |
- name: Set Version | |
working-directory: typescript | |
run: | | |
version=$(cat ../app/setup_handlers.go | grep "const releaseVersion" | cut -d ' ' -f4 | tr -d '"') | |
npm version ${version} | |
- name: Publish package on NPM 📦 | |
run: npm publish | |
working-directory: typescript | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |