fix(sdk): single checkbox label sits next to the box, not under it (v… #14
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: Publish SDK | |
| on: | |
| push: | |
| tags: | |
| - 'sdk-v*' | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: 'npm dist-tag (e.g. latest, next)' | |
| required: false | |
| default: 'latest' | |
| dry_run: | |
| description: 'Run npm publish with --dry-run' | |
| type: boolean | |
| required: false | |
| default: false | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| defaults: | |
| run: | |
| working-directory: sdk | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Verify tag matches package version | |
| if: startsWith(github.ref, 'refs/tags/sdk-v') | |
| run: | | |
| PKG_VERSION=$(node -p "require('./package.json').version") | |
| TAG_VERSION="${GITHUB_REF_NAME#sdk-v}" | |
| echo "package.json version: $PKG_VERSION" | |
| echo "tag version: $TAG_VERSION" | |
| if [ "$PKG_VERSION" != "$TAG_VERSION" ]; then | |
| echo "::error::Tag $GITHUB_REF_NAME does not match package.json version $PKG_VERSION" | |
| exit 1 | |
| fi | |
| - run: npm ci | |
| - run: npm run build | |
| - name: Publish to npm | |
| run: | | |
| ARGS="--access public --provenance" | |
| if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then | |
| ARGS="$ARGS --tag ${{ inputs.tag }}" | |
| if [ "${{ inputs.dry_run }}" = "true" ]; then | |
| ARGS="$ARGS --dry-run" | |
| fi | |
| fi | |
| npm publish $ARGS | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |