Skip to content

chore(master): release 1.0.0 (#2) #2

chore(master): release 1.0.0 (#2)

chore(master): release 1.0.0 (#2) #2

on:
push:
branches:
- master
workflow_dispatch:
permissions:
contents: write
pull-requests: write
name: release-please
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v4
id: 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.MY_RELEASE_PLEASE_TOKEN }}
# this is a built-in strategy in release-please, see "Action Inputs"
# for more options
release-type: node
- name: Checkout
if: ${{ steps.release.outputs.release_created }}
uses: actions/checkout@v4
- name: Use Node
if: ${{ steps.release.outputs.release_created }}
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- name: Restore Yarn Cache
if: ${{ steps.release.outputs.release_created }}
id: yarn-cache
uses: actions/cache@v4
with:
path: |
**/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Dependencies 🔧
if: steps.yarn-cache.outputs.cache-hit != 'true' && ${{ steps.release.outputs.release_created }}
run: |
yarn
- name: Build ☕️
if: ${{ steps.release.outputs.release_created }}
run: |
yarn build
cd dist
npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}