Skip to content

Release new versions dependent on cipher v0.5 (#113) #11

Release new versions dependent on cipher v0.5 (#113)

Release new versions dependent on cipher v0.5 (#113) #11

Workflow file for this run

name: Publish to crates.io
on:
push:
tags: [
'belt-ctr-v*',
'cbc-v*',
'cfb-mode-v*',
'cfb8-v*',
'ctr-v*',
'cts-v*',
'ige-v*',
'ofb-v*',
'pcbc-v*',
]
jobs:
publish:
runs-on: ubuntu-latest
environment: publish
permissions:
id-token: write
steps:
- uses: actions/checkout@v6
- uses: rust-lang/crates-io-auth-action@v1
id: auth
- name: Extract Crate Name and Version
run: |
TAG_NAME="${{ github.ref_name }}"
CRATE_NAME=${TAG_NAME%-v*}
CRATE_VERSION=${TAG_NAME##*-v}
echo $CRATE_NAME $CRATE_VERSION
echo "CRATE_NAME=${CRATE_NAME}" >> $GITHUB_ENV
echo "CRATE_VERSION=${CRATE_VERSION}" >> $GITHUB_ENV
- name: Check crate version
working-directory: ${{ env.CRATE_NAME }}
run: |
CRATE_TOML_VERSION=$(grep "^version =" Cargo.toml | cut -d'"' -f2)
echo $CRATE_TOML_VERSION
[[ $CRATE_TOML_VERSION == $CRATE_VERSION ]]
- name: Publish
working-directory: ${{ env.CRATE_NAME }}
env:
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
run: cargo publish