Skip to content

Commit

Permalink
avoid run changesets mutitple times
Browse files Browse the repository at this point in the history
  • Loading branch information
jigsawye committed Nov 10, 2024
1 parent 030a3fa commit 50ac44c
Showing 1 changed file with 37 additions and 2 deletions.
39 changes: 37 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- main

jobs:
release:
build:
strategy:
matrix:
include:
Expand All @@ -26,7 +26,7 @@ jobs:
target: x86_64-pc-windows-msvc
name: win32-x64

name: Release ${{ matrix.name }}
name: Build ${{ matrix.name }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -63,6 +63,41 @@ jobs:
cp target/${{ matrix.target }}/release/swagit npm/@swagit/${{ matrix.name }}/bin/
fi
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.name }}
path: npm/@swagit/${{ matrix.name }}
compression-level: 0

release:
name: Create Release
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup pnpm
uses: pnpm/action-setup@v4.0.0

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

- name: Install Dependencies
run: pnpm install

- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: npm
pattern: '*'
merge-multiple: true

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
Expand Down

0 comments on commit 50ac44c

Please sign in to comment.