revert to working CLI #135
This file contains 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: Draft release | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- ".github/workflows/release-vscode-extension.yml" | |
- "cddl-lsp/**" | |
jobs: | |
compilation-check: | |
uses: anweiss/cddl/.github/workflows/compilation-check.yml@main | |
cargo-publish-dry-run: | |
name: Cargo publish dry run | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v2 | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- name: cargo publish --dry-run | |
uses: actions-rs/cargo@v1 | |
with: | |
command: publish | |
args: --dry-run | |
wasm-compilation-check: | |
name: Compilation check for wasm target and npm publishing | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v2 | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
target: wasm32-unknown-unknown | |
override: true | |
- name: Install Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: "16" | |
- name: Install wasmpack | |
run: | | |
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
- name: Build wasm default features | |
run: | | |
wasm-pack build --target nodejs --scope anweiss --release | |
- name: Build wasm lsp feature | |
run: | | |
wasm-pack build --target nodejs --scope anweiss --release --out-dir cddl-languageserver -- --features lsp | |
sed -i -e 's/"name": "@anweiss\/cddl"/"name": "@anweiss\/cddl-languageserver"/g' cddl-languageserver/package.json | |
- name: npm publish dry run | |
run: | | |
cd pkg | |
npm publish --access=public --dry-run | |
cd ../cddl-languageserver | |
npm publish --access=public --dry-run | |
website-build-check: | |
name: Build website | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v2 | |
with: | |
persist-credentials: false | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
target: wasm32-unknown-unknown | |
- name: Install wasmpack | |
run: | | |
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
- name: Install node | |
uses: actions/setup-node@v1 | |
with: | |
node-version: "16" | |
- name: Build wasm | |
run: | | |
wasm-pack build --release | |
- name: Build web | |
run: | | |
cd www | |
npm install | |
npm run build | |
draft-release: | |
name: Draft Release | |
needs: | |
[ | |
compilation-check, | |
cargo-publish-dry-run, | |
wasm-compilation-check, | |
website-build-check, | |
] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v2 | |
- name: Draft Release | |
id: draft_release | |
uses: release-drafter/release-drafter@v5 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
publish: ${{ startsWith(github.ref, 'refs/tags') }} |