Add release automation with npm trusted publishing #747
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: Validate | |
| # On pushes to main this runs as part of the Release workflow (via | |
| # workflow_call), which gates publishing on it. | |
| on: | |
| workflow_call: | |
| pull_request: | |
| concurrency: | |
| group: validate-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| validate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: "24" | |
| - working-directory: "./oxide-api" | |
| run: npm ci | |
| - name: Typecheck client | |
| working-directory: "./oxide-api" | |
| run: npm run tsc | |
| - working-directory: "./oxide-openapi-gen-ts" | |
| run: npm ci | |
| # TODO: this probably doesn't make sense anymore, it should be done already | |
| - name: Generate client | |
| run: "./tools/gen.sh" | |
| - name: Lint generator | |
| working-directory: "./oxide-openapi-gen-ts" | |
| run: npm run lint | |
| - name: Check formatting | |
| working-directory: "./oxide-openapi-gen-ts" | |
| run: npm run fmt:check | |
| - name: Test generator | |
| working-directory: "./oxide-openapi-gen-ts" | |
| run: npm test run | |
| # moved to the end because it relies on spec.json, which is downloaded by the tests | |
| - name: Typecheck generator | |
| working-directory: "./oxide-openapi-gen-ts" | |
| run: npm run tsc |