Skip to content

Merge pull request #1 from TurtIeSocks/i18n-number-component #3

Merge pull request #1 from TurtIeSocks/i18n-number-component

Merge pull request #1 from TurtIeSocks/i18n-number-component #3

Workflow file for this run

name: Publish to crates.io
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Check out the code
uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Install Linux dependencies
run: sudo apt-get update; sudo apt-get install pkg-config libx11-dev libasound2-dev libudev-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev
- name: Cache Cargo registry
uses: actions/cache@v3
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-
- name: Cache Cargo index
uses: actions/cache@v3
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-index-
- name: Install toml-cli
run: cargo install toml-cli
- name: Check version
run: test "v$(toml get -r Cargo.toml package.version)" = "${{ github.ref_name }}"
- name: Build and verify the main crate
run: cargo publish --dry-run
- name: Publish the main crate to crates.io
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo publish