mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
refractor: separate preview and release workflows
This commit is contained in:
30
.github/workflows/preview.yaml
vendored
Normal file
30
.github/workflows/preview.yaml
vendored
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
name: Preview
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- "apps/cli/**"
|
||||||
|
- "package.json"
|
||||||
|
- "bun.lock"
|
||||||
|
|
||||||
|
concurrency: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
preview:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout Code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Setup Bun
|
||||||
|
uses: oven-sh/setup-bun@v2
|
||||||
|
with:
|
||||||
|
bun-version: latest
|
||||||
|
|
||||||
|
- name: Install Dependencies
|
||||||
|
run: bun install --frozen-lockfile
|
||||||
|
|
||||||
|
- name: Publish Preview Package
|
||||||
|
run: bunx pkg-pr-new publish './apps/cli' --bin
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
name: Publish
|
name: Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -6,16 +6,15 @@ on:
|
|||||||
- main
|
- main
|
||||||
- beta
|
- beta
|
||||||
paths:
|
paths:
|
||||||
- 'apps/cli/**'
|
- "apps/cli/**"
|
||||||
- '.changeset/**'
|
- ".changeset/**"
|
||||||
- 'package.json'
|
- "package.json"
|
||||||
- 'bun.lock'
|
- "bun.lock"
|
||||||
pull_request:
|
|
||||||
|
|
||||||
concurrency: ${{ github.workflow }}-${{ github.ref }}
|
concurrency: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish:
|
release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
@@ -31,14 +30,12 @@ jobs:
|
|||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: bun install --frozen-lockfile
|
run: bun install --frozen-lockfile
|
||||||
|
|
||||||
- run: bunx pkg-pr-new publish './apps/cli' --bin
|
|
||||||
|
|
||||||
- name: Create Release Pull Request or Publish
|
- name: Create Release Pull Request or Publish
|
||||||
id: changesets
|
id: changesets
|
||||||
uses: changesets/action@v1
|
uses: changesets/action@v1
|
||||||
with:
|
with:
|
||||||
publish: bun run publish-packages
|
publish: bun run publish-packages
|
||||||
env:
|
env:
|
||||||
MODE: 'prod'
|
MODE: "prod"
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
Reference in New Issue
Block a user