README: update use cases in README #50
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: Build | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: [main] | |
jobs: | |
build-action: | |
name: Build Action | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout Project | |
uses: actions/checkout@v4.2.2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4.1.0 | |
with: | |
node-version-file: .nvmrc | |
- name: Setup Buf | |
uses: bufbuild/buf-setup-action@v1 | |
- name: Configure Buf Registry | |
run: | | |
npm config set @buf:registry https://buf.build/gen/npm/v1/ | |
npm config set //buf.build/gen/npm/v1/:_authToken ${{ secrets.BUF_TOKEN }} | |
npm install @buf/blacksmith_vm-agent.connectrpc_es@latest | |
- name: Install Dependencies | |
run: npm ci | |
- name: Check Lint | |
run: npm run lint | |
- name: Build Action | |
run: | | |
npm run build | |
# Check if any files were changed during build | |
if ! git diff --quiet; then | |
echo "Error: Build generated changes that aren't committed. Please run 'npm run build' locally and commit the changes." | |
git diff | |
exit 1 | |
fi |