Skip to content

Commit

Permalink
ci: seperate versioning and publish
Browse files Browse the repository at this point in the history
  • Loading branch information
tscpp committed Jun 24, 2024
1 parent 42d3519 commit d28d85a
Showing 1 changed file with 37 additions and 11 deletions.
48 changes: 37 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ permissions:
pull-requests: write

jobs:
release:
name: Release
versioning:
name: Versioning
runs-on: ubuntu-latest
steps:
- name: Checkout Repository (deep)
Expand All @@ -39,18 +39,9 @@ jobs:
with:
bun-version: 1

- name: Authenticate NPM
run: npm config set "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}"

- name: Install
run: pnpm install --frozen-lockfile

- name: Build packages
run: pnpm nx run-many -t build --projects=@knuckles/*

- name: Publish packages
run: pnpm nx release publish

- name: Setup Git User
run: node .github/scripts/setup-git-user.js

Expand Down Expand Up @@ -78,3 +69,38 @@ jobs:
GITHUB_REPO: ${{ github.repository }}
GITHUB_HEAD_BRANCH: "automated-versioning"
GITHUB_BASE_BRANCH: "main"

publish:
name: Publish
runs-on: ubuntu-latest
steps:
- name: Checkout Repository (deep)
uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: pnpm/action-setup@v3
with:
version: 9

- name: Setup Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 20.x

- name: Setup Bun 1.x
uses: oven-sh/setup-bun@v1
with:
bun-version: 1

- name: Authenticate NPM
run: npm config set "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}"

- name: Install
run: pnpm install --frozen-lockfile

- name: Build packages
run: pnpm nx run-many -t build --projects=@knuckles/*

- name: Publish packages
run: pnpm nx release publish

0 comments on commit d28d85a

Please sign in to comment.