Skip to content

Publish to crates.io #12

Publish to crates.io

Publish to crates.io #12

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-latest
steps:
- name: Checkout repo
if: inputs.tag == 'latest'
uses: actions/checkout@b32f140b0c872d58512e0a66172253c302617b90
- name: Checkout repo (tag)
if: inputs.tag != 'latest'
uses: actions/checkout@b32f140b0c872d58512e0a66172253c302617b90
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 }}