v0.2.11 release #255
Workflow file for this run
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: Build | |
on: | |
push: | |
branches: | |
- main | |
- release-* | |
tags: | |
- v* | |
pull_request: | |
branches: | |
- main | |
- release-* | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write # The OIDC ID token is used for authentication with JSR. | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: denoland/setup-deno@v2 | |
with: | |
deno-version: v2.x | |
- name: Run tests | |
run: deno test test/**/*.test.ts | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: "1.24" | |
- name: Install Apex CLI | |
run: deno install -g -A --unstable-worker-options -f -n apex jsr:@apexlang/apex | |
- name: Install Protoc | |
run: | | |
PB_REL="https://github.com/protocolbuffers/protobuf/releases" | |
curl -LO $PB_REL/download/v3.15.8/protoc-3.15.8-linux-x86_64.zip | |
sudo unzip protoc-3.15.8-linux-x86_64.zip -d /usr/local | |
sudo rm protoc-3.15.8-linux-x86_64.zip | |
- name: Install protoc-gen-go | |
run: | | |
go install google.golang.org/protobuf/cmd/[email protected] | |
go install google.golang.org/grpc/cmd/[email protected] | |
- name: Install swagger-cli | |
run: npm install -g @apidevtools/swagger-cli | |
# Temporarily disable until it's determined why apex generate is not writing files. | |
# - name: Run the difference test | |
# run: ./diffcheck.sh | |
# working-directory: ./testdata | |
- name: Validate generated OpenAPI | |
run: find . -name 'openapi.yaml' -exec swagger-cli validate {} \; | |
working-directory: ./testdata | |
- name: Is Release? | |
if: startswith(github.ref, 'refs/tags/v') | |
run: echo "DEPLOY_PACKAGE=true" >> $GITHUB_ENV | |
- name: Publish to npm | |
if: env.DEPLOY_PACKAGE == 'true' | |
run: npx jsr publish |