Skip to content

Publish crates on crates.io #3

Publish crates on crates.io

Publish crates on crates.io #3

Workflow file for this run

name: Publish crates on crates.io
on:
workflow_dispatch:
inputs:
skf-api-version:
description: "major/minor/patch or semver or none if not updating derive crate"
required: false
default: "none"
skf-rs-version:
description: "major/minor/patch or semver or none if not updating derive crate"
required: false
default: "none"
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set git credentials
run: |
git config user.name github-actions
git config user.email github-actions@github.com
- name: Publish crates
uses: kaleidawave/crates-release-gh-action@main
id: release
with:
version: |
{
"skf-api": "${{ github.event.inputs.skf-api-version }}",
"skf-rs": "${{ github.event.inputs.skf-rs-version }}"
}
crates-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Push updated Cargo.toml
run: |
echo '${{ steps.release.outputs.new-versions }}' | jq -r '.[]' | while read -r update; do
git tag "release/$update"
done
git add .
git commit -m "Release: ${{ steps.release.outputs.new-versions-description }}"
git push --tags origin main