diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6ffcbcc..ecd1a1f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -63,13 +63,16 @@ jobs: id: check_changes run: | git remote set-url origin https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$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 @@ -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: diff --git a/.npmignore b/.npmignore index 4a0b4b1..3442ac3 100644 --- a/.npmignore +++ b/.npmignore @@ -1,4 +1,5 @@ target +Cargo.toml Cargo.lock .cargo .github @@ -12,4 +13,15 @@ yarn.lock __test__ renovate.json token -*.stackdump \ No newline at end of file +*.stackdump +.devcontainer +crates +rust-analyzer-target +target +scripts +lldb +.vscode +.persist +.beachballrc.json +CODEOWNERS +change diff --git a/npm/darwin-arm64/package.json b/npm/darwin-arm64/package.json index 9c20ce1..9b7f3a9 100644 --- a/npm/darwin-arm64/package.json +++ b/npm/darwin-arm64/package.json @@ -19,4 +19,4 @@ "type": "git", "url": "https://github.com/Adjective-Object/good-fences-rs-core" } -} \ No newline at end of file +} diff --git a/npm/darwin-x64/package.json b/npm/darwin-x64/package.json index e7d0d38..65f32e8 100644 --- a/npm/darwin-x64/package.json +++ b/npm/darwin-x64/package.json @@ -19,4 +19,4 @@ "type": "git", "url": "https://github.com/Adjective-Object/good-fences-rs-core" } -} \ No newline at end of file +} diff --git a/npm/linux-arm-gnueabihf/package.json b/npm/linux-arm-gnueabihf/package.json index 350cdfd..79d9634 100644 --- a/npm/linux-arm-gnueabihf/package.json +++ b/npm/linux-arm-gnueabihf/package.json @@ -19,4 +19,4 @@ "type": "git", "url": "https://github.com/Adjective-Object/good-fences-rs-core" } -} \ No newline at end of file +} diff --git a/npm/linux-arm64-gnu/package.json b/npm/linux-arm64-gnu/package.json index 1f1cb81..ea17319 100644 --- a/npm/linux-arm64-gnu/package.json +++ b/npm/linux-arm64-gnu/package.json @@ -22,4 +22,4 @@ "libc": [ "glibc" ] -} \ No newline at end of file +} diff --git a/npm/linux-x64-gnu/package.json b/npm/linux-x64-gnu/package.json index b8bc87d..eb77fde 100644 --- a/npm/linux-x64-gnu/package.json +++ b/npm/linux-x64-gnu/package.json @@ -22,4 +22,4 @@ "libc": [ "glibc" ] -} \ No newline at end of file +} diff --git a/npm/win32-arm64-msvc/package.json b/npm/win32-arm64-msvc/package.json index 5932c9f..96ca653 100644 --- a/npm/win32-arm64-msvc/package.json +++ b/npm/win32-arm64-msvc/package.json @@ -19,4 +19,4 @@ "type": "git", "url": "https://github.com/Adjective-Object/good-fences-rs-core" } -} \ No newline at end of file +} diff --git a/npm/win32-x64-msvc/package.json b/npm/win32-x64-msvc/package.json index a05e77d..994d3ab 100644 --- a/npm/win32-x64-msvc/package.json +++ b/npm/win32-x64-msvc/package.json @@ -19,4 +19,4 @@ "type": "git", "url": "https://github.com/Adjective-Object/good-fences-rs-core" } -} \ No newline at end of file +} diff --git a/package.json b/package.json index d6508c0..7ef4253 100644 --- a/package.json +++ b/package.json @@ -48,5 +48,9 @@ "dependencies": { "commander": "^9.4.1" }, + "workspaces": [ + "npm/*", + "." + ], "packageManager": "yarn@4.4.0+sha512.91d93b445d9284e7ed52931369bc89a663414e5582d00eea45c67ddc459a2582919eece27c412d6ffd1bd0793ff35399381cb229326b961798ce4f4cc60ddfdb" -} +} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index ca32149..e8283fc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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:."