Skip to content

Merge pull request #484 from easyops-cn/steve/jobs #246

Merge pull request #484 from easyops-cn/steve/jobs

Merge pull request #484 from easyops-cn/steve/jobs #246

on:
push:
branches:
- master
name: release-please
jobs:
release-please:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
outputs:
release_created: ${{ steps.release.outputs.docusaurus-search-local--release_created }}
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
token: ${{ secrets.GH_TOKEN_EVE }}
release-type: node
package-name: "@easyops-cn/docusaurus-search-local"
path: docusaurus-search-local
bump-minor-pre-major: true
npm-publish:
needs: release-please
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
# Ensure that a publication only occurs when a new release is created:
if: ${{ needs.release-please.outputs.release_created }}
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- uses: actions/cache@v4
# use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn install --immutable
- run: yarn build:theme
# https://github.com/yarnpkg/berry/issues/2034#issuecomment-715295553
- run: yarn workspaces foreach --all --no-private npm publish
env:
YARN_NPM_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}