Golem 1.5 (#3265) #4328
This file contains hidden or 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
| name: CI | |
| on: | |
| push: | |
| tags: | |
| - "golem-ts-v*.*.*" | |
| branches: | |
| - main | |
| pull_request: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| WASM_RQUICKJS_VERSION: "0.2.2" | |
| WASI_SDK_VERSION: "25" | |
| WASI_SDK_PATH: /opt/wasi-sdk | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest # NOTE: must not be blacksmith for npmjs provenance to work | |
| if: "startsWith(github.ref, 'refs/tags/golem-ts-v')" | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/setup-rust | |
| with: | |
| use-cache: 'false' | |
| rust-targets: 'wasm32-wasip1 wasm32-wasip2' | |
| install-cargo-make: 'false' | |
| install-cargo-binstall: 'true' | |
| - uses: ./.github/actions/setup-js-wasm-tools | |
| with: | |
| registry-url: "https://registry.npmjs.org" | |
| wasi-sdk-version: ${{ env.WASI_SDK_VERSION }} | |
| wasi-sdk-path: ${{ env.WASI_SDK_PATH }} | |
| wasm-rquickjs-version: ${{ env.WASM_RQUICKJS_VERSION }} | |
| install-cargo-component: 'true' | |
| - name: Update npm | |
| run: npm install -g npm@latest | |
| - name: Extract version from tag | |
| id: get_version | |
| run: | | |
| TAG=${GITHUB_REF#refs/tags/} | |
| VERSION=${TAG##*-v} | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| - name: Set versions in all packages | |
| working-directory: sdks/ts | |
| run: | | |
| VERSION=${{ steps.get_version.outputs.version }} | |
| for pkg in packages/golem-ts-types-core packages/golem-ts-typegen packages/golem-ts-sdk packages/golem-ts-bridge packages/golem-ts-repl; do | |
| cd $pkg | |
| npm version $VERSION --no-git-tag-version | |
| cd ../../ | |
| done | |
| - name: Install dependencies | |
| working-directory: sdks/ts | |
| run: pnpm install | |
| - name: Build all packages | |
| working-directory: sdks/ts | |
| run: pnpm run build | |
| - name: Build the agent template WASM binary | |
| working-directory: sdks/ts | |
| run: pnpm run build-agent-template | |
| - name: Publish all packages | |
| working-directory: sdks/ts | |
| run: pnpm -r publish --access public --no-git-checks | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |