Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stabilize 1.0.0 #109

Merged
merged 27 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
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
35 changes: 35 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Check

on: push

jobs:
build:
name: Attempt Build
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 20

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 9

- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: 1.80.1

- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh

- name: Install NPM dependencies
run: pnpm install

- name: Build & Bundle
run: pnpm build
34 changes: 0 additions & 34 deletions .github/workflows/ci.yml

This file was deleted.

99 changes: 64 additions & 35 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,67 @@
name: Publish Package to npmjs

on:
push:
tags:
- "*"
push:
tags:
- "*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v3
- name: "Install Node & NPM"
uses: actions/setup-node@v3
with:
node-version: "18.x"
registry-url: "https://registry.npmjs.org"
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 8
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: 1.79.0
- name: "Install wasm-pack"
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh

- name: Install jq
uses: dcarbone/[email protected]

- name: "Install NPM dependencies"
run: npm install
- name: "Build & Bundle"
run: npm run build
- name: "Publish!"
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
build:
name: Publish
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 20
registry-url: "https://registry.npmjs.org"

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 9

- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: 1.80.1

- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh

- name: Extract versions
run: |
echo "GIT_TAG=${GITHUB_REF##*/}" >> $GITHUB_ENV
echo "PKG_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV

- name: Assert package versions
run: |
echo "CM_VERSION=$CM_VERSION"
echo "PKG_VERSION=$PKG_VERSION"

if [[ "v$PKG_VERSION" != "$GIT_TAG" ]]; then
echo "Version mismatch! Please correct package versions"
exit 1
else
echo "Version check complete"
fi

- name: Install NPM dependencies
run: pnpm install

- name: Build & Bundle
run: pnpm build

- name: Publish (latest)
if: github.ref == 'refs/heads/main'
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish (next)
if: github.ref != 'refs/heads/main'
run: npm publish --access public --tag next
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Loading
Loading