Skip to content

Commit

Permalink
ci: publish to npm
Browse files Browse the repository at this point in the history
  • Loading branch information
ciscorn committed Nov 25, 2024
1 parent b303513 commit bc21d8e
Show file tree
Hide file tree
Showing 12 changed files with 8,612 additions and 12,702 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Publish Package to npm

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: "pnpm"
registry-url: 'https://registry.npmjs.org'
- run: pnpm install
- run: pnpm publish --provenance --access public --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

11 changes: 4 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
node_modules

dist/
credentials.json

# Output
.output
.vercel
/.svelte-kit
/build
/dist
.wrangler

# OS
.DS_Store
Thumbs.db

# Log
*.log

# Env
.env
.env.*
Expand All @@ -23,5 +22,3 @@ Thumbs.db
# Vite
vite.config.js.timestamp-*
vite.config.ts.timestamp-*

credentials.json
32 changes: 17 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

![NPM Version](https://img.shields.io/npm/v/%40mierune%2Fsveltekit-firebase-auth-ssr)

SvelteKit に Firebase Authentication による認証を組みこむためのパッケージです。Server-Side Rendering (SSR) 専用です。
[WIP]

Node.js 環境だけでなく、Cloudflare Pages/Workers でも動作するように実装されています ([MIERUNE/firebase-auth-cloudflare-workers-x509](https://github.com/MIERUNE/firebase-auth-cloudflare-workers-x509))。
A package for integrating Firebase Authentication into SvelteKit, designed specifically for Server-Side Rendering (SSR).

デモ: https://sveltekit-firebaseauth-ssr-stripe-demo.pages.dev/
It is implemented to work not only in Node.js but also on Cloudflare Workers/Pages ([MIERUNE/firebase-auth-cloudflare-workers-x509](https://github.com/MIERUNE/firebase-auth-cloudflare-workers-x509)).

Demo: https://sveltekit-firebaseauth-ssr-stripe-demo.pages.dev/

## Installation

Expand All @@ -16,16 +18,16 @@ npm install -D @mierune/sveltekit-firebase-auth-ssr

## Usage

1. 用意するもの:

- Firebase プロジェクトの Project ID
- Firebase プロジェクトの API Key
- Firebase の(Google Cloudの)サービスアカウントキー
1. **Prerequisites**:
- Project ID of the Firebase project
- API Key of the Firebase project
- Firebase Service Account Key (from Google Cloud)
2. **Add the necessary code to**:
- `src/hooks.client.ts`. (Example: TODO)
- `src/hooks.server.ts`. (Example: TODO)
- `src/app.d.ts`. (Example: TODO)
- `src/routes/+layout.server.ts`. (Example: TODO)
3. **Implement sign-in and sign-out functionality** in your application. (Example: TODO)
4. Use the user information and implement DB integration if needed.
5. Ensure that the required environment variables are set in the execution environment.

2. `src/hooks.client.ts` にお決まりのコードを加える。例)TODO
3. `src/hooks.server.ts` にお決まりのコードを加える。例)TODO
4. `src/app.d.ts` にお決まりのコードを加える。例)TODO
5. `src/routes/+layout.server.ts` にお決まりのコードを加える。例)TODO
6. 適切な場所でサインインとサインアウトを実装する。例)TODO
7. 必要な場所でユーザ情報を利用する。
8. 必要な環境変数を、実行環境に忘れずに設定する。
Loading

0 comments on commit bc21d8e

Please sign in to comment.