Skip to content

Publish to crates.io #13

Publish to crates.io

Publish to crates.io #13

Workflow file for this run

name: Publish to crates.io
on:
workflow_dispatch:
inputs:
tag:
description: 'Tag to publish'
required: true
default: 'latest'
env:
CARGO_TERM_COLOR: always
PKG_CONFIG_SYSROOT_DIR: /
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
# Publish to crates.io
publish:
runs-on: ubuntu-24.04
steps:
- name: Checkout repo
if: inputs.tag == 'latest'
uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08
- name: Checkout repo (tag)
if: inputs.tag != 'latest'
uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08
with:
ref: ${{ inputs.tag }}
- name: Prepare Python
run: |
pip3 install requests toml
- name: Publish
run: |
python3 -u scripts/crates_publish.py
env:
RELEASE: true
CARGO_REGISTRY_TOKEN: ${{ secrets.RUST_CARGO_REGISTRY }}