Skip to content

Commit

Permalink
CI: publish preview package versions of PRs (sidebase#884)
Browse files Browse the repository at this point in the history
  • Loading branch information
zoey-kaiser authored Aug 25, 2024
1 parent c5a62d9 commit 9de8b1a
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: nodejs CI
name: CI

on:
push:
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/pkg.pr.new.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Publish Commit
on:
push:
branches:
- '**'
tags:
- '!**'
pull_request:

env:
NODE_VER: 22.5

concurrency:
group: ${{ github.workflow }}-${{ github.event.number }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
steps:
- name: Checkout code
uses: actions/checkout@v2

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false

- name: Use Node.js ${{ env.NODE_VER }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VER }}
cache: 'pnpm'

- name: Install deps
run: pnpm i

- name: Build and pack
run: pnpm prepack

- name: Publish package preview
run: pnpx pkg-pr-new publish --compact
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
shamefully-hoist=true
strict-peer-dependencies=false
link-workspace-packages=true
ignore-workspace-root-check=true
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
"type": "module",
"description": "Authentication built for Nuxt 3! Easily add authentication via OAuth providers, credentials or Email Magic URLs!",
"homepage": "https://auth.sidebase.io",
"repository": {
"type": "git",
"url": "https://github.com/sidebase/nuxt-auth"
},
"repository": "github:sidebase/nuxt-auth",
"engines": {
"pnpm": ">=9.4.0",
"node": ">=20"
Expand Down

0 comments on commit 9de8b1a

Please sign in to comment.