chore: update portable text component link in readme (#276) #152
This file contains 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: Release Please | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: read | |
jobs: | |
release-please: | |
permissions: | |
contents: read # for checkout | |
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: actions/create-github-app-token@v1 | |
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: googleapis/release-please-action@v4 | |
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 == 'true' }} | |
- uses: pnpm/action-setup@v4 | |
if: ${{ steps.release.outputs.releases_created == 'true' }} | |
- uses: actions/setup-node@v4 | |
if: ${{ steps.release.outputs.releases_created == 'true' }} | |
with: | |
cache: pnpm | |
node-version: lts/* | |
- run: pnpm install --ignore-scripts | |
if: ${{ steps.release.outputs.releases_created == 'true' }} | |
- name: Set publishing config | |
run: pnpm config set '//registry.npmjs.org/:_authToken' "${NODE_AUTH_TOKEN}" | |
if: ${{ steps.release.outputs.releases_created == 'true' }} | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_PUBLISH_TOKEN}} | |
# 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 == 'true' }} | |
env: | |
NPM_CONFIG_PROVENANCE: true |