Skip to content

fix: remove env_logger dep from strandify library #71

fix: remove env_logger dep from strandify library

fix: remove env_logger dep from strandify library #71

Workflow file for this run

name: CI
on:
pull_request:
push:
jobs:
test:
name: Test Suite
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
rust: [stable]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install toolchain
run: rustup toolchain install stable --profile minimal
- uses: Swatinem/rust-cache@v2
- name: Run tests
run: cargo test
release:
name: release
if: ${{ github.ref == 'refs/heads/main' && github.repository_owner == 'loiccoyle' }}
needs:
- test
outputs:
strandify--release_created: ${{ steps.release.outputs.strandify--release_created }}
strandify-cli--release_created: ${{ steps.release.outputs.strandify-cli--release_created }}
strandify-wasm--release_created: ${{ steps.release.outputs.strandify-wasm--release_created }}
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
config-file: .github/release-please-config.json
manifest-file: .github/.release-please-manifest.json
publish:
name: Publish
needs:
- release
if: needs.release.outputs.strandify--release_created || needs.release.outputs.strandify-cli--release_created || needs.release.outputs.strandify-wasm--release_created
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install toolchain
run: rustup toolchain install stable --profile minimal
- uses: Swatinem/rust-cache@v2
- name: Publish lib crate
if: needs.release.outputs.strandify--release_created
run: |
cd strandify
cargo publish --token ${{ secrets.CARGO_TOKEN }}
- name: Publish cli crate
if: needs.release.outputs.strandify-cli--release_created
run: |
cd strandify-cli
cargo publish --token ${{ secrets.CARGO_TOKEN }}
- uses: actions/setup-node@v4
if: needs.release.outputs.strandify-wasm--release_created
with:
node-version: "22.x"
registry-url: "https://registry.npmjs.org"
- name: Publish wasm npm pkg
if: needs.release.outputs.strandify-wasm--release_created
run: |
cargo install wasm-pack
cd strandify-wasm
wasm-pack build
npm publish pkg/
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
readme:
runs-on: ubuntu-latest
needs: test
if: github.event_name == 'push' && github.repository == 'loiccoyle/strandify' && github.ref_name == 'main'
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.BOT_ACCESS_TOKEN }}
- name: Install toolchain
run: rustup toolchain install stable --profile minimal
- uses: Swatinem/rust-cache@v2
- run: make readme
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "docs(readme): update help message"
branch: ${{ github.head_ref }}
commit_user_name: github-actions[bot]
commit_user_email: github-actions[bot]@users.noreply.github.com
commit_author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>