diff --git a/.github/workflows/npm-release.yaml b/.github/workflows/npm-release.yaml index 222eb13..f425658 100644 --- a/.github/workflows/npm-release.yaml +++ b/.github/workflows/npm-release.yaml @@ -3,7 +3,6 @@ on: push: branches: - main - jobs: release: if: ${{ github.ref == 'refs/heads/main' && !startsWith(github.event.head_commit.message, 'NPM Package Release') }} @@ -19,23 +18,19 @@ jobs: ssh-key: ${{ secrets.PUBLISH_PRIVATE_KEY }} submodules: recursive fetch-depth: 0 - - uses: DeterminateSystems/nix-installer-action@main with: determinate: true - uses: DeterminateSystems/flakehub-cache-action@main - - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: "24.x" registry-url: "https://registry.npmjs.org" - - name: Upgrade npm for OIDC run: | npm install -g npm@latest npm --version - - name: Verify OIDC availability run: | if [ -n "${ACTIONS_ID_TOKEN_REQUEST_URL}" ] && [ -n "${ACTIONS_ID_TOKEN_REQUEST_TOKEN}" ]; then @@ -46,7 +41,6 @@ jobs: echo "Check workflow permissions include 'id-token: write'" exit 1 fi - - name: Verify repository configuration run: | echo "Checking repository consistency..." @@ -60,31 +54,24 @@ jobs: exit 1 fi echo "Repositories match" - - run: nix develop -c build-submodules - - run: nix develop -c local-bundle - - name: Install Playwright browsers with dependencies run: | cd svelte-test npx playwright install --with-deps - - name: Test full integration run: nix develop -c test-full-integration - - name: Git Config run: | git config --global user.email "${{ secrets.CI_GIT_EMAIL }}" git config --global user.name "${{ secrets.CI_GIT_USER }}" - # get hash of latest published pkgs from npm and concat them - name: Get Old Hash run: | OLD_HASH=$(npm view @rainlanguage/sqlite-web dist.shasum 2>/dev/null || echo "none") echo "OLD_HASH=$OLD_HASH" >> $GITHUB_ENV echo "old hash: $OLD_HASH" - # Build the package and calc hash - name: Build and Get New Hash run: | @@ -93,7 +80,6 @@ jobs: echo "NEW_HASH=$NEW_HASH" >> $GITHUB_ENV echo "new hash: $NEW_HASH" rm -f pkg/*.tgz - # from here on, we'll skip if OLD_HASH and NEW_HASH are the same (ie no publish) # this means we need to skip every step by using an if statement. # set npm version in pkg directory @@ -107,18 +93,16 @@ jobs: sed -i.bak "s/^version = \".*\"/version = \"$NEW_VERSION\"/" "$manifest" rm "$manifest".bak done - + nix develop -c taplo fmt packages/sqlite-web/Cargo.toml packages/sqlite-web-core/Cargo.toml # Create sqlite-web npm package tarball - name: Create sqlite-web NPM Package Tarball if: ${{ env.OLD_HASH != env.NEW_HASH }} run: | cd pkg echo "NPM_PACKAGE=$(npm pack --silent)" >> $GITHUB_ENV - - name: Rename sqlite-web NPM Package Tarball if: ${{ env.OLD_HASH != env.NEW_HASH }} run: mv pkg/${{ env.NPM_PACKAGE }} sqlite_web_npm_package_${{ env.NEW_VERSION }}.tgz - # publish sqlite-web pkg to npm - name: Publish sqlite-web pkg To NPM if: ${{ env.OLD_HASH != env.NEW_HASH }} @@ -126,7 +110,6 @@ jobs: npm publish sqlite_web_npm_package_${{ env.NEW_VERSION }}.tgz \ --access public \ --verbose - # Commit changes and tag - name: Commit And Tag if: ${{ env.OLD_HASH != env.NEW_HASH }} @@ -134,7 +117,6 @@ jobs: git add pkg/package.json packages/sqlite-web/Cargo.toml packages/sqlite-web-core/Cargo.toml git commit -m "NPM Package Release v${{ env.NEW_VERSION }}" git tag npm-v${{ env.NEW_VERSION }} - # Push the commit to remote - name: Push Changes To Remote if: ${{ env.OLD_HASH != env.NEW_HASH }} @@ -143,7 +125,6 @@ jobs: git push -u origin npm-v${{ env.NEW_VERSION }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # Create gitHub release with tarballs - name: Create GitHub Release with sqlite-web pkg if: ${{ env.OLD_HASH != env.NEW_HASH }} diff --git a/packages/sqlite-web-core/Cargo.toml b/packages/sqlite-web-core/Cargo.toml index d2392e5..2cf1380 100644 --- a/packages/sqlite-web-core/Cargo.toml +++ b/packages/sqlite-web-core/Cargo.toml @@ -17,7 +17,7 @@ serde-wasm-bindgen = { workspace = true } uuid = { workspace = true } console_error_panic_hook = { workspace = true } sqlite-wasm-rs = { workspace = true } -rain-math-float = { path = "../../lib/rain.math.float/crates/float"} +rain-math-float = { path = "../../lib/rain.math.float/crates/float" } alloy = { workspace = true } base64 = { workspace = true }