-
Notifications
You must be signed in to change notification settings - Fork 1
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
4 changed files
with
54 additions
and
41 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 |
---|---|---|
|
@@ -451,44 +451,3 @@ jobs: | |
name: bindings-universal-apple-darwin | ||
path: ${{ env.APP_NAME }}.*.node | ||
if-no-files-found: error | ||
publish: | ||
name: Publish | ||
runs-on: ubuntu-latest | ||
if: (github.ref == 'refs/heads/main' && github.event_name == 'push') || (github.event.pull_request.base.ref == 'main' && github.event.pull_request.merged == true) | ||
needs: | ||
- build-freebsd | ||
- test-macOS-windows-binding | ||
- test-linux-x64-gnu-binding | ||
- test-linux-x64-musl-binding | ||
- test-linux-aarch64-gnu-binding | ||
- test-linux-aarch64-musl-binding | ||
- test-linux-arm-gnueabihf-binding | ||
- universal-macOS | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
check-latest: true | ||
- name: Install dependencies | ||
run: npm install -g [email protected] && pnpm install --no-frozen-lockfile | ||
|
||
- name: Download all artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
path: artifacts | ||
- name: Move artifacts | ||
run: pnpm artifacts | ||
- name: List packages | ||
run: ls -R ./npm | ||
shell: bash | ||
- name: Create Release Pull Request or Publish to npm | ||
id: changesets | ||
uses: changesets/action@v1 | ||
with: | ||
version: pnpm run bump | ||
publish: npm run release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
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,52 @@ | ||
name: Publish packages to npm | ||
|
||
permissions: | ||
pull-requests: write | ||
contents: write | ||
|
||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
concurrency: ${{ github.workflow }}-${{ github.ref }} | ||
|
||
jobs: | ||
call-rust-build: | ||
uses: ./.github/workflows/CI.yaml | ||
|
||
release: | ||
name: Release | ||
needs: [call-rust-build] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node.js 20 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Install Dependencies | ||
run: npm install -g [email protected] && pnpm i --frozen-lockfile | ||
|
||
- name: Download all artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
path: artifacts | ||
|
||
- name: Move Artifacts | ||
run: pnpm artifacts | ||
|
||
- name: Create Release Pull Request or Publish to npm | ||
id: changesets | ||
uses: changesets/action@v1 | ||
with: | ||
version: pnpm run bump | ||
# This expects you to have a script called release which does a build for your packages and calls changeset publish | ||
publish: pnpm release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
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
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 |
---|---|---|
|
@@ -6,6 +6,7 @@ description = "Rust based magic-string implementation with sourcemap chains supp | |
authors = ["brightwu(吴明亮) <[email protected]>"] | ||
license = "MIT" | ||
repository = "https://github.com/farm-fe/enhanced-magic-string" | ||
git_release_enable = true | ||
|
||
[dependencies] | ||
sourcemap = "6.2.3" | ||
|