Skip to content

Commit

Permalink
add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
scottbedard committed Jul 21, 2024
1 parent 14ea6c2 commit e161a01
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 2 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: build

on:
push:
branches: ["*"]
pull_request:
branches: ["main"]

env:
CARGO_TERM_COLOR: always

jobs:
rust:
name: Rust

runs-on: ubuntu-latest

container:
image: xd009642/tarpaulin:develop-nightly
options: --security-opt seccomp=unconfined

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Test
run: |
cargo +nightly tarpaulin --verbose --all-features --workspace --timeout 120 --out xml
- name: Upload coverage report
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true

wasm:
name: WASM

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: false

- uses: jetli/[email protected]
with:
version: 'latest'

- name: Install dependencies
run: pnpm install

- name: Build wasm package
run: pnpm build

- name: TypeScript tests
run: pnpm test
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@bedard/hexchess",
"version": "0.1.0",
"version": "0.2.0",
"description": "",
"scripts": {
"build": "wasm-pack build && node scripts/build.js",
"build": "wasm-pack build --release && node scripts/build.js",
"test": "vitest"
},
"keywords": [],
Expand Down

0 comments on commit e161a01

Please sign in to comment.