Skip to content

Merge pull request #2 from SolinkCorp/release-please--branches--maste… #2

Merge pull request #2 from SolinkCorp/release-please--branches--maste…

Merge pull request #2 from SolinkCorp/release-please--branches--maste… #2

on:
push:
branches:
- master
name: Release Please
jobs:
release-please:
runs-on: ubuntu-20.04
steps:
- name: Release Please
uses: google-github-actions/release-please-action@v3
id: release
with:
release-type: node
# The logic below handles the npm publication:
- name: Checkout code
uses: actions/checkout@v2
# these if statements ensure that a publication only occurs when
# a new release is created:
if: ${{ steps.release.outputs.release_created }}
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '20'
if: ${{ steps.release.outputs.release_created }}
- name: Install pnpm
run: npm install -g pnpm
if: ${{ steps.release.outputs.release_created }}
- name: Install Dependencies
run: pnpm install
if: ${{ steps.release.outputs.release_created }}
- name: Check
run: pnpm run check
if: ${{ steps.release.outputs.release_created }}
- name: Test
run: pnpm run test
if: ${{ steps.release.outputs.release_created }}
- name: Build Package
run: pnpm run build
if: ${{ steps.release.outputs.release_created }}
- name: Setup NPM permissions
run: |
echo "@solinkcorp:registry=https://npm.pkg.github.com/" > .npmrc
echo "//npm.pkg.github.com/:_authToken=${{secrets.GITHUB_TOKEN}}" >> .npmrc
- name: Publish Package
run: pnpm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
if: ${{ steps.release.outputs.release_created }}