Skip to content

chore(main): release 0.6.1 (#18) #41

chore(main): release 0.6.1 (#18)

chore(main): release 0.6.1 (#18) #41

on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
name: release-please
jobs:
release:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.output-release-created.outputs.release_created }}
steps:
- uses: googleapis/release-please-action@v4
id: release
name: release
with:
# this assumes that you have created a personal access token
# (PAT) and configured it as a GitHub action secret named
# `MY_RELEASE_PLEASE_TOKEN` (this secret name is not important).
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
# this is a built-in strategy in release-please, see "Action Inputs"
# for more options
release-type: node
- name: Output Release Created
id: output-release-created
run: |
release_created=${{ steps.release.outputs.release_created }}
echo "::set-output name=release_created::$release_created"
publish:
runs-on: ubuntu-latest
needs: release
if: ${{ needs.release.outputs.release_created }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Cache Node Modules
id: cache-node-modules
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-node-
- name: Setup Pnpm
uses: pnpm/action-setup@v3
- name: Install Dependencies
if: ${{ steps.cache-node-modules.outputs.cache-hit != 'true' }}
run: pnpm install
- name: Build Lib
run: pnpm lib:build
- name: Publish
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}