Skip to content

Commit

Permalink
build: fix publish scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
goszczynskip committed Nov 20, 2024
1 parent 011e776 commit d6a3b77
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 26 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,10 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
node-version: 20

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
uses: pnpm/action-setup@v4

- name: Install dependencies
run: pnpm install
Expand Down
49 changes: 27 additions & 22 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,40 @@
name: Publish to NPM
name: Release

on:
push:
tags:
- 'v*'
branches:
- main # or your default branch

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
publish:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Checkout Repo
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
registry-url: 'https://registry.npmjs.org'

node-version: 20

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: Install dependencies
uses: pnpm/action-setup@v4

- name: Install Dependencies
run: pnpm install

- name: Build
run: pnpm build

- name: Publish to NPM
run: pnpm publish --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Build Packages
run: |
pnpm build --no-cache
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: pnpm release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit d6a3b77

Please sign in to comment.