Skip to content

Commit

Permalink
ci: fix release (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrii-bodnar authored Aug 7, 2024
1 parent 4ce3a31 commit 56aca4d
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 5 deletions.
37 changes: 35 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,21 @@ on:
- 'README.md'
- 'LICENSE'

env:
TOOLCHAIN: nightly-2024-07-21

jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable

- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.TOOLCHAIN }}
targets: wasm32-wasi

- uses: Swatinem/rust-cache@v2

- name: Run cargo check
Expand All @@ -30,11 +38,36 @@ jobs:
needs: check
steps:
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2024-07-21
toolchain: ${{ env.TOOLCHAIN }}
targets: wasm32-wasi

- uses: Swatinem/rust-cache@v2

- name: Run cargo test
run: cargo test

test-publish:
name: Test Publish
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.TOOLCHAIN }}
targets: wasm32-wasi

- uses: Swatinem/rust-cache@v2

- name: Set up Node
uses: actions/setup-node@v4
with:
registry-url: 'https://registry.npmjs.org'
node-version: 16.x

- name: Publish Dry Run
run: npm publish --dry-run
13 changes: 10 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,26 @@ on:
release:
types: [released, prereleased]

env:
TOOLCHAIN: nightly-2024-07-21

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable

- name: Set up Node 14
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.TOOLCHAIN }}
targets: wasm32-wasi

- name: Set up Node
uses: actions/setup-node@v4
with:
registry-url: 'https://registry.npmjs.org'
node-version: 14.x
node-version: 16.x

- uses: Swatinem/rust-cache@v2

Expand Down

0 comments on commit 56aca4d

Please sign in to comment.