Skip to content

Commit

Permalink
ci: fix release process (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrii-bodnar authored Sep 12, 2024
1 parent 8fc767f commit 17a2088
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 5 deletions.
40 changes: 38 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: 1.80.0

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,8 +38,36 @@ jobs:
needs: check
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 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: 1.80.0

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 17a2088

Please sign in to comment.