Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 26 additions & 16 deletions .github/workflows/releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -242,13 +242,16 @@ jobs:
echo "📦 Publishing stable version to crates.io: $VERSION"
fi

cargo install cargo-workspaces --locked
cargo install cargo-workspaces@0.3.6 --locked
cargo workspaces publish --from-git --yes

publish-npm-packages:
name: Publish NPM Packages
runs-on: ubuntu-latest
needs: validate-and-prepare
permissions:
contents: read
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -257,14 +260,16 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: '22'
registry-url: 'https://registry.npmjs.org'

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

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build packages
run: pnpm build:ts

- name: Determine npm tag
id: npm_tag
run: |
Expand All @@ -276,20 +281,25 @@ jobs:
echo "📦 Publishing with 'latest' tag for stable release"
fi

- name: Publish to npm
run: |
# Get the tag to use
TAG="${{ steps.npm_tag.outputs.tag }}"

# Build first
pnpm build:ts

# Publish each package explicitly with the correct tag
cd packages/enclave-config && npm publish --access public --tag $TAG --provenance && cd ../..
cd packages/enclave-contracts && npm publish --access public --tag $TAG --provenance && cd ../..
cd crates/wasm && npm publish --access public --tag $TAG --provenance && cd ../..
cd packages/enclave-sdk && npm publish --access public --tag $TAG --provenance && cd ../..
cd packages/enclave-react && npm publish --access public --tag $TAG --provenance && cd ../..
- name: Publish @enclave-e3/config
working-directory: packages/enclave-config
run: npm publish --access public --tag ${{ steps.npm_tag.outputs.tag }} --provenance

- name: Publish @enclave-e3/contracts
working-directory: packages/enclave-contracts
run: npm publish --access public --tag ${{ steps.npm_tag.outputs.tag }} --provenance

- name: Publish @enclave-e3/wasm
working-directory: crates/wasm
run: npm publish --access public --tag ${{ steps.npm_tag.outputs.tag }} --provenance

- name: Publish @enclave-e3/sdk
working-directory: packages/enclave-sdk
run: npm publish --access public --tag ${{ steps.npm_tag.outputs.tag }} --provenance

- name: Publish @enclave-e3/react
working-directory: packages/enclave-react
run: npm publish --access public --tag ${{ steps.npm_tag.outputs.tag }} --provenance

create-github-release:
name: Create GitHub Release
Expand Down
Loading