Skip to content

Commit

Permalink
chore: unify publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvander committed Aug 22, 2024
1 parent db00348 commit 505f0d6
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 49 deletions.
47 changes: 31 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,39 @@ name: Test & Build

on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
branches: [ "main" ]
branches: ["main"]

jobs:
build:
test-and-build:
name: Test & Build
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm i -g yarn
- run: yarn
- run: yarn test
- run: yarn build
- uses: actions/checkout@v3
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- run: bun i && bun test && bun run build
release-please:
name: Release Please
runs-on: ubuntu-latest
steps:
- id: release
uses: google-github-actions/release-please-action@v3
with:
release-type: node
package-name: zustand-computed
release:
name: Create NPM Release
runs-on: ubuntu-latest
needs: [release-please, test-and-build]
if: ${{ needs.release-please.outputs.release_created }}
steps:
- uses: actions/checkout@v2
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- run: bunx npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
33 changes: 0 additions & 33 deletions .github/workflows/release-please.yml

This file was deleted.

0 comments on commit 505f0d6

Please sign in to comment.