Remove npm pack content check step #57
This file contains hidden or 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: Compile TypeScript Protobuf Definitions | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
compile: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 10 | |
run_install: false | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "latest" | |
cache: "pnpm" | |
registry-url: "https://registry.npmjs.org/" | |
scope: "@blueyerobotics" | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y protobuf-compiler | |
pnpm install | |
- name: Generate | |
run: | | |
mkdir -p ./out/ && | |
protoc protobuf_definitions/*.proto \ | |
--plugin=./node_modules/.bin/protoc-gen-ts_proto \ | |
--proto_path=protobuf_definitions \ | |
--ts_proto_out=./out \ | |
--ts_proto_opt=outputIndex=true \ | |
--ts_proto_opt=globalThisPolyfill=true \ | |
--ts_proto_opt=useExactTypes=false | |
- name: Compile | |
run: pnpm run build | |
- name: Publish to npm | |
run: | | |
cp README.npm.md README.md | |
VERSION=$(pnpm pkg get version | tr -d '"') | |
SHORT_SHA=${GITHUB_SHA::8} | |
pnpm version --no-git-tag-version "${VERSION}-${SHORT_SHA}" | |
pnpm publish --no-git-checks s--access public --tag latest | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |