Files
contracts/.github/workflows/publish.yml
2026-03-24 14:43:57 +03:00

43 lines
1.0 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: Publish
on:
push:
branches:
- main
jobs:
publish:
name: Publish Job
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: "https://registry.npmjs.org/"
- name: Install protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Check protoc installation
run: |
protoc --version
which protoc
- name: Install deps
run: npm install
- name: Generate TS Protobuf (Directly)
# Запускаем команду напрямую в обход npm run, чтобы исключить баги с путями npm
run: protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit
- name: Publish package
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}