fix: windows file location in 3.21.4 #13
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 Package to npmjs | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- run: echo "π The job was automatically triggered by a ${{ github.event_name }} event." | |
- run: echo "π§ This job is now running on a ${{ runner.os }} server hosted by GitHub!" | |
- run: echo "π The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '18.x' | |
registry-url: 'https://registry.npmjs.org' | |
- run: echo "π‘ The ${{ github.repository }} repository has been cloned to the runner." | |
- run: npm ci | |
- name: Check for protoc-gen-js | |
run: | | |
if [ ! -f bin/protoc-gen-js ]; then | |
echo "File not found: bin/protoc-gen-js" | |
exit 1 | |
fi | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v3 | |
with: | |
repo-token: ${{ secrets.RENOVATE_TOKEN }} | |
- name: Test protoc generation | |
run: | | |
protoc --js_out=import_style=commonjs:. --plugin=protoc-gen-js=bin/protoc-gen-js test/example.proto | |
- name: Check for generated JS file | |
run: | | |
if [ ! -f test/example_pb.js ]; then | |
echo "JS File not generated: test/example_pb.js" | |
exit 1 | |
fi | |
- name: setup git config | |
run: | | |
git config user.name "GitHub Actions Bot" | |
git config user.email "<>" | |
- uses: JS-DevTools/npm-publish@v3 | |
with: | |
token: ${{ secrets.NPM_TOKEN }} | |
- run: echo "π This job's status is ${{ job.status }}." |