# https://docs.npmjs.com/trusted-publishers#step-2-configure-your-cicd-workflow name: Publish Package on: push: tags: - "v*" permissions: id-token: write # Required for OIDC contents: read jobs: publish: runs-on: ubuntu-latest environment: release steps: - uses: actions/checkout@v7.0.1 with: submodules: true # Create test data in geotiff-test-data so that tests pass - uses: prefix-dev/setup-pixi@v0.11.3 with: pixi-version: v0.63.2 working-directory: ./fixtures/geotiff-test-data # NPY fixtures are generated from the GeoTIFF fixtures on demand with # rasterio - name: Create npy fixtures working-directory: ./fixtures/geotiff-test-data run: pixi run generate-npy - uses: pnpm/action-setup@v6.1.1 - name: Use Node.js 20 uses: actions/setup-node@v7.1.0 with: node-version: "24" registry-url: "https://registry.npmjs.org" package-manager-cache: false # never use caching in release builds - run: pnpm install - run: pnpm build - run: pnpm test - name: Read version and publish env: # Clear the sentinel value setup-node writes; otherwise npm tries to # use it as a bearer token and rejects OIDC. # https://github.com/actions/setup-node/issues/1440#issuecomment-3571890875 NODE_AUTH_TOKEN: "" run: | # All packages are expected to have the same version VERSION=$(jq -r .version packages/deck.gl-raster/package.json) if [[ "$VERSION" == *alpha* || "$VERSION" == *beta* ]]; then pnpm publish --recursive --no-git-checks --tag beta --verbose else pnpm publish --recursive --no-git-checks --verbose fi