Skip to content

ci(action): update actions/cache action to v5.0.3 (#657) #22

ci(action): update actions/cache action to v5.0.3 (#657)

ci(action): update actions/cache action to v5.0.3 (#657) #22

name: Release Please
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
jobs:
release-please:
name: 📦 Release Please
runs-on: ubuntu-latest
steps:
- name: Generate GitHub App Token
id: app-token
uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
with:
app-id: ${{ secrets.RELEASE_APP_ID }}
private-key: ${{ secrets.RELEASE_APP_PEM }}
- uses: googleapis/release-please-action@16a9c90856f42705d54a6fda1823352bdc62cf38 # v4.4.0
id: release
with:
token: ${{ steps.app-token.outputs.token }}
# Node.js release type for package.json versioning
release-type: node
# Publish to npm when a release is created
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
if: ${{ steps.release.outputs.release_created }}
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version-file: package.json
registry-url: 'https://registry.npmjs.org/'
if: ${{ steps.release.outputs.release_created }}
# Skip post-install scripts here, as a malicious
# script could steal NODE_AUTH_TOKEN.
- name: Install dependencies
run: npm ci --ignore-scripts
env:
CI: true
NODE_AUTH_TOKEN: ${{ secrets.CI_NPM_READ_ORG }}
if: ${{ steps.release.outputs.release_created }}
# `npm rebuild` will run all those post-install scripts for us.
- run: npm rebuild && npm run prepare --if-present
if: ${{ steps.release.outputs.release_created }}
- name: Publish to NPM Package Registry
run: npm publish --access=public
env:
CI: true
NODE_AUTH_TOKEN: ${{ secrets.CI_NPM_REGISTRY }}
if: ${{ steps.release.outputs.release_created }}