Skip to content

chore(main): release 3.1.5 (#215) #104

chore(main): release 3.1.5 (#215)

chore(main): release 3.1.5 (#215) #104

---
name: Release Please
on:
push:
branches:
- main
permissions:
contents: read
jobs:
release-please:
permissions:
id-token: write # to enable use of OIDC for npm provenance
# permissions for pushing commits and opening PRs are handled by the `generate-token` step
runs-on: ubuntu-latest
steps:
- uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2
id: generate-token
with:
app_id: ${{ secrets.ECOSPARK_APP_ID }}
private_key: ${{ secrets.ECOSPARK_APP_PRIVATE_KEY }}
# This action will create a release PR when regular conventional commits are pushed to main, it'll also detect if a release PR is merged and npm publish should happen
- uses: google-github-actions/release-please-action@v3
id: release
with:
release-type: node
token: ${{ steps.generate-token.outputs.token }}
path: packages/sanity-astro
# Publish to NPM on new releases
- uses: actions/checkout@v4
if: ${{ steps.release.outputs.releases_created }}
- uses: pnpm/action-setup@v2
if: ${{ steps.release.outputs.releases_created }}
- uses: actions/setup-node@v4
if: ${{ steps.release.outputs.releases_created }}
with:
cache: pnpm
node-version: lts/*
registry-url: "https://registry.npmjs.org"
- run: corepack enable && pnpm --version && pnpm install --ignore-scripts && pnpm audit
if: ${{ steps.release.outputs.releases_created }}
# Release Please has already incremented versions and published tags, so we just
# need to publish the new version to npm here
- run: pnpm -r publish
if: ${{ steps.release.outputs.releases_created }}
env:
NPM_CONFIG_PROVENANCE: true
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}