-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
161 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: "Install dependencies" | ||
description: "Prepare repository and all dependencies" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Set up pnpm | ||
uses: pnpm/action-setup@v4 | ||
|
||
- name: Set up Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
cache: pnpm | ||
node-version: 20 | ||
|
||
- uses: oven-sh/setup-bun@v1 | ||
with: | ||
bun-version: latest | ||
|
||
- name: Install dependencies | ||
shell: bash | ||
run: pnpm install |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Pull request | ||
on: | ||
pull_request: | ||
types: [opened, reopened, synchronize, ready_for_review] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
verify: | ||
name: Verify | ||
uses: ./.github/workflows/verify.yml | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Main | ||
on: | ||
push: | ||
branches: [main] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
verify: | ||
name: Verify | ||
uses: ./.github/workflows/verify.yml | ||
secrets: inherit | ||
|
||
changesets: | ||
name: Changesets | ||
needs: verify | ||
permissions: | ||
contents: write | ||
id-token: write | ||
issues: write | ||
repository-projects: write | ||
deployments: write | ||
packages: write | ||
pull-requests: write | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
|
||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v4 | ||
with: | ||
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits | ||
fetch-depth: 0 | ||
|
||
- name: Install dependencies | ||
uses: ./.github/actions/install-dependencies | ||
|
||
- name: Create version pull request or publish to npm | ||
uses: changesets/action@v1 | ||
with: | ||
title: 'chore: version packages' | ||
commit: 'chore: version packages' | ||
publish: pnpm changeset:release | ||
version: pnpm changeset:version | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
- name: Publish Prerelease | ||
if: steps.changesets.outputs.published != 'true' | ||
continue-on-error: true | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
npm config set "//registry.npmjs.org/:_authToken" "$NPM_TOKEN" | ||
git reset --hard origin/main | ||
pnpm clean | ||
pnpm changeset version --no-git-tag --snapshot canary | ||
pnpm changeset publish --no-git-tag --snapshot canary --tag canary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Verify | ||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
|
||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install dependencies | ||
uses: ./.github/actions/install-dependencies | ||
|
||
- name: Lint code | ||
run: pnpm format && pnpm lint | ||
|
||
- uses: stefanzweifel/git-auto-commit-action@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
commit_message: 'chore: format' | ||
commit_user_name: 'github-actions[bot]' | ||
commit_user_email: 'github-actions[bot]@users.noreply.github.com' | ||
|
||
types: | ||
name: Types | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install dependencies | ||
uses: ./.github/actions/install-dependencies | ||
|
||
- name: Build | ||
run: pnpm build | ||
|
||
- name: Check types | ||
run: pnpm typecheck | ||
|
||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install dependencies | ||
uses: ./.github/actions/install-dependencies | ||
- run: pnpm preconstruct | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 'latest' | ||
|
||
- name: Run tests | ||
run: pnpm test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
{ | ||
"description": "A monorepo for Farcaster Auth", | ||
"version": "0.0.0", | ||
"private": true, | ||
"packageManager": "[email protected]", | ||
"scripts": { | ||
|