v0.101.0 #1060
This file contains hidden or 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: ci | |
| on: [push, pull_request] | |
| jobs: | |
| build-rust: | |
| runs-on: ubuntu-latest | |
| env: | |
| RUST_BACKTRACE: full | |
| # https://github.com/rust-unofficial/patterns/blob/master/anti_patterns/deny-warnings.md | |
| RUSTFLAGS: -D warnings | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Install rust | |
| uses: dsherret/rust-toolchain-file@v1 | |
| - name: Clippy | |
| run: | | |
| cargo clippy --all-targets --locked --no-default-features | |
| cargo clippy --all-targets --locked | |
| cargo clippy --all-targets --locked --all-features | |
| - name: Test | |
| run: cargo test --all-features --locked | |
| build-javascript: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Install rust | |
| uses: dsherret/rust-toolchain-file@v1 | |
| - name: Install Deno | |
| uses: denoland/setup-deno@v1 | |
| with: | |
| deno-version: 2.x | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: '20.x' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Build | |
| run: deno task build && deno task node | |
| - name: Test | |
| run: deno task test | |
| - name: Get tag version | |
| if: startsWith(github.ref, 'refs/tags/') | |
| id: get_tag_version | |
| run: echo TAG_VERSION=${GITHUB_REF/refs\/tags\//} >> "$GITHUB_OUTPUT" | |
| - name: Publish deno.land/x | |
| uses: denoland/publish-folder@82ce065074e7174baf444332c4b7c40869a4909a | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| folder: js | |
| branch: deno_registry | |
| tag: deno/${{ steps.get_tag_version.outputs.TAG_VERSION }} | |
| token: ${{ secrets.DENOBOT_PAT }} | |
| git-user-name: denobot | |
| git-user-email: denobot@users.noreply.github.com | |
| - name: Build npm | |
| run: deno run -A ./build_npm.ts ${{ github.ref_name }} | |
| - name: Publish npm | |
| if: | | |
| github.repository == 'denoland/eszip' && | |
| startsWith(github.ref, 'refs/tags/') | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| run: | | |
| cargo publish | |
| cd npm/ && npm publish |