feat(backend): payment-streams endpoint (#478) #1
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 api-augment to npm.js | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'api-augment/**' | |
| workflow_dispatch: | |
| inputs: | |
| sha: | |
| description: Full SHA to build the pnpm package from | |
| required: true | |
| dry_run: | |
| description: Perform a dry run (no actual publish) | |
| type: boolean | |
| required: false | |
| default: false | |
| jobs: | |
| publish-api-augment: | |
| runs-on: blacksmith-4vcpu-ubuntu-2404 | |
| steps: | |
| - name: Checkout (manual) | |
| if: github.event_name == 'workflow_dispatch' | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.inputs.sha }} | |
| - name: Checkout (push) | |
| if: github.event_name != 'workflow_dispatch' | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm & cache | |
| uses: ./.github/workflow-templates/setup-pnpm | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: Install and build API Augment | |
| run: | | |
| cd api-augment | |
| pnpm i --no-frozen-lockfile | |
| pnpm run build | |
| - name: Publish API Augment | |
| if: ${{ !(github.event_name == 'workflow_dispatch' && github.event.inputs.dry_run == 'true') }} | |
| working-directory: api-augment | |
| env: | |
| NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | |
| run: | | |
| PKG_NAME=$(node -p "require('./package.json').name") | |
| PKG_VERSION=$(node -p "require('./package.json').version") | |
| echo "Publishing $PKG_NAME v$PKG_VERSION" | |
| pnpm publish --access public --no-git-checks || { | |
| echo "Publish failed (possibly already published). Checking registry..."; | |
| CURR=$(npm view "$PKG_NAME" version || echo ""); | |
| if [ "$CURR" = "$PKG_VERSION" ]; then | |
| echo "Version already published. Skipping."; | |
| exit 0; | |
| else | |
| echo "Unexpected publish error."; | |
| exit 1; | |
| fi | |
| } | |
| - name: Dry run note | |
| if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.dry_run == 'true' }} | |
| run: echo "Dry run enabled; skipped npm publish." |