Skip to content

chore(deps): update renovatebot/github-action action to v39.1.0 #419

chore(deps): update renovatebot/github-action action to v39.1.0

chore(deps): update renovatebot/github-action action to v39.1.0 #419

Workflow file for this run

name: CI/CD
on:
push:
paths-ignore:
- README.md
branches: [main]
tags: [v*.*.*]
pull_request: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Test
run: cargo test -F bin,wasm
- name: Lint
run: cargo clippy -F bin,wasm
version:
runs-on: ubuntu-latest
needs: test
outputs:
version: ${{ steps.version.outputs.version }}
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Compute package version
id: version
run: echo "version=${GITHUB_REF##refs/tags/v}" >> $GITHUB_OUTPUT
build:
runs-on: ubuntu-22.04
needs: version
steps:
- uses: actions/checkout@v4
- name: Override version
run: sed -i 's/^version = ".+"$/version = "${{ needs.version.outputs.version }}"/' Cargo.toml
- name: Install cross
run: cargo install cross --git https://github.com/cross-rs/cross
- name: Build cross platforms
run: |
cross build --release --locked --target aarch64-unknown-linux-gnu
cross build --release --locked --target aarch64-unknown-linux-musl
cross build --release --locked --target x86_64-unknown-linux-gnu
cross build --release --locked --target x86_64-unknown-linux-musl
cross build --release --locked --target x86_64-pc-windows-gnu
mkdir tmp/
mv ./target/aarch64-unknown-linux-gnu/release/base-converter ./tmp/base-converter-aarch64-unknown-linux-gnu
mv ./target/aarch64-unknown-linux-musl/release/base-converter ./tmp/base-converter-aarch64-unknown-linux-musl
mv ./target/x86_64-unknown-linux-gnu/release/base-converter ./tmp/base-converter-x86_64-unknown-linux-gnu
mv ./target/x86_64-unknown-linux-musl/release/base-converter ./tmp/base-converter-x86_64-unknown-linux-musl
mv ./target/x86_64-pc-windows-gnu/release/base-converter ./tmp/base-converter-x86_64-pc-windows-gnu
# - name: Install wasm-pack
# run: curl -fL --tlsv1.2 --proto '=https' https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
# - name: Build wasm
# run: wasm-pack build --target web --scope ctison . -F wasm
# - name: Publish on npmjs.com
# working-directory: pkg/
# env:
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# run: npm publish
- name: Publish on crates.io
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo publish --allow-dirty --locked
- name: Github Release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
fail_on_unmatched_files: true
files: |
./tmp/base-converter-aarch64-unknown-linux-gnu
./tmp/base-converter-aarch64-unknown-linux-musl
./tmp/base-converter-x86_64-unknown-linux-gnu
./tmp/base-converter-x86_64-unknown-linux-musl
./tmp/base-converter-x86_64-pc-windows-gnu
body: |
# Rust Doc
https://docs.rs/base-converter/${{ steps.version.outputs.version }}/base_converter/
# ## NPM Package
# https://www.npmjs.com/package/base-converter/v/${{ steps.version.outputs.version }}