feat: allow ternary operator in filter expressions #237
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: Main | |
| on: push | |
| permissions: | |
| id-token: write # Required for OIDC | |
| contents: read | |
| jobs: | |
| build: | |
| name: Build CLI | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22.14.0 | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build CLI | |
| run: | | |
| npm run prettier | |
| npm run lint | |
| npm run build | |
| - name: Upload dist files | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: build | |
| path: dist | |
| generate: | |
| name: Generate SDK | |
| runs-on: ubuntu-latest | |
| needs: build | |
| strategy: | |
| matrix: | |
| target: [node, node.rx, browser, browser.rx] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22.14.0 | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Download dist files | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: build | |
| path: dist | |
| - name: Generate SDK | |
| run: | | |
| chmod +x ./bin/cli.js | |
| ./bin/cli.js test/openapi.json --target ${{ matrix.target }} | |
| ./bin/cli.js test/openapi_v2.json --target ${{ matrix.target }} | |
| publish: | |
| name: Publish release version | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| needs: build | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22.14.0 | |
| - name: Download dist files | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: build | |
| path: dist | |
| - name: Publish release | |
| run: | | |
| npm install -g npm@latest | |
| npm publish --access public --tag latest | |
| publish_snapshot: | |
| name: Publish snapshot version | |
| runs-on: ubuntu-latest | |
| if: | | |
| github.ref_name == 'master' && | |
| !startsWith(github.ref, 'refs/tags/v') | |
| needs: build | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22.14.0 | |
| - name: Download dist files | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: build | |
| path: dist | |
| - name: Publish snapshot | |
| run: | | |
| npm install -g npm@latest | |
| LATEST_TAG=$(git describe --tags --abbrev=0) | |
| LATEST_TAG_RAW=$(echo "$LATEST_TAG" | sed 's/v//') | |
| COMMITS_SINCE_LAST_TAG=$(git rev-list "$LATEST_TAG"..HEAD --count) | |
| VERSION="$LATEST_TAG_RAW-dev.$COMMITS_SINCE_LAST_TAG" | |
| npm version "$VERSION" --git-tag-version=false | |
| npm publish --access public --tag snapshot |