Skip to content

Commit

Permalink
don't publish src, don't forget to napi prepublish
Browse files Browse the repository at this point in the history
  • Loading branch information
Max Huang-Hobbs authored and Max Huang-Hobbs committed Nov 19, 2024
1 parent 8e5bf47 commit a4aa6f1
Show file tree
Hide file tree
Showing 11 changed files with 77 additions and 12 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,16 @@ jobs:
id: check_changes
run: |
git remote set-url origin https://$GITHUB_ACTOR:[email protected]/$GITHUB_REPOSITORY.git
OLD_PACKAGE_VERSION=$(node -e "console.log(require('./package.json').version)")
# Generate changes from beachball, including package.json version bump
if yarn beachball bump | grep "Removing change files:"; then
echo "changes!"
yarn beachball bump
# check for changes
PACKAGE_VERSION=$(node -e "console.log(require('./package.json').version)")
if [ "$OLD_PACKAGE_VERSION" != "$PACKAGE_VERSION" ]; then
echo "HAS_CHANGES=true" >> "$GITHUB_OUTPUT"
else
echo "no changes!"
echo "HAS_CHANGES=false" >> "$GITHUB_OUTPUT"
fi
shell: bash
Expand All @@ -90,6 +93,10 @@ jobs:
git tag "v$PACKAGE_VERSION"
git push origin main --tags
# Required to do github releasing from napi & prep `optionalDependencies` in package.json
# for final publish
yarn prepublishOnly
# Publish all packages
yarn npm publish --tag "latest" --access public --tolerate-republish
env:
Expand Down
14 changes: 13 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
target
Cargo.toml
Cargo.lock
.cargo
.github
Expand All @@ -12,4 +13,15 @@ yarn.lock
__test__
renovate.json
token
*.stackdump
*.stackdump
.devcontainer
crates
rust-analyzer-target
target
scripts
lldb
.vscode
.persist
.beachballrc.json
CODEOWNERS
change
2 changes: 1 addition & 1 deletion npm/darwin-arm64/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
"type": "git",
"url": "https://github.com/Adjective-Object/good-fences-rs-core"
}
}
}
2 changes: 1 addition & 1 deletion npm/darwin-x64/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
"type": "git",
"url": "https://github.com/Adjective-Object/good-fences-rs-core"
}
}
}
2 changes: 1 addition & 1 deletion npm/linux-arm-gnueabihf/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
"type": "git",
"url": "https://github.com/Adjective-Object/good-fences-rs-core"
}
}
}
2 changes: 1 addition & 1 deletion npm/linux-arm64-gnu/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
"libc": [
"glibc"
]
}
}
2 changes: 1 addition & 1 deletion npm/linux-x64-gnu/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
"libc": [
"glibc"
]
}
}
2 changes: 1 addition & 1 deletion npm/win32-arm64-msvc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
"type": "git",
"url": "https://github.com/Adjective-Object/good-fences-rs-core"
}
}
}
2 changes: 1 addition & 1 deletion npm/win32-x64-msvc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
"type": "git",
"url": "https://github.com/Adjective-Object/good-fences-rs-core"
}
}
}
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,9 @@
"dependencies": {
"commander": "^9.4.1"
},
"workspaces": [
"npm/*",
"."
],
"packageManager": "[email protected]+sha512.91d93b445d9284e7ed52931369bc89a663414e5582d00eea45c67ddc459a2582919eece27c412d6ffd1bd0793ff35399381cb229326b961798ce4f4cc60ddfdb"
}
}
42 changes: 42 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,48 @@ __metadata:
languageName: node
linkType: hard

"@good-fences/api-darwin-arm64@workspace:npm/darwin-arm64":
version: 0.0.0-use.local
resolution: "@good-fences/api-darwin-arm64@workspace:npm/darwin-arm64"
languageName: unknown
linkType: soft

"@good-fences/api-darwin-x64@workspace:npm/darwin-x64":
version: 0.0.0-use.local
resolution: "@good-fences/api-darwin-x64@workspace:npm/darwin-x64"
languageName: unknown
linkType: soft

"@good-fences/api-linux-arm-gnueabihf@workspace:npm/linux-arm-gnueabihf":
version: 0.0.0-use.local
resolution: "@good-fences/api-linux-arm-gnueabihf@workspace:npm/linux-arm-gnueabihf"
languageName: unknown
linkType: soft

"@good-fences/api-linux-arm64-gnu@workspace:npm/linux-arm64-gnu":
version: 0.0.0-use.local
resolution: "@good-fences/api-linux-arm64-gnu@workspace:npm/linux-arm64-gnu"
languageName: unknown
linkType: soft

"@good-fences/api-linux-x64-gnu@workspace:npm/linux-x64-gnu":
version: 0.0.0-use.local
resolution: "@good-fences/api-linux-x64-gnu@workspace:npm/linux-x64-gnu"
languageName: unknown
linkType: soft

"@good-fences/api-win32-arm64-msvc@workspace:npm/win32-arm64-msvc":
version: 0.0.0-use.local
resolution: "@good-fences/api-win32-arm64-msvc@workspace:npm/win32-arm64-msvc"
languageName: unknown
linkType: soft

"@good-fences/api-win32-x64-msvc@workspace:npm/win32-x64-msvc":
version: 0.0.0-use.local
resolution: "@good-fences/api-win32-x64-msvc@workspace:npm/win32-x64-msvc"
languageName: unknown
linkType: soft

"@good-fences/api@workspace:.":
version: 0.0.0-use.local
resolution: "@good-fences/api@workspace:."
Expand Down

0 comments on commit a4aa6f1

Please sign in to comment.