Skip to content

update crate to use latest otel crates (#4) #12

update crate to use latest otel crates (#4)

update crate to use latest otel crates (#4) #12

Workflow file for this run

name: Release and Publish
on:
push:
tags:
- 'v*'
release:
types: [published]
jobs:
cargo-publish:
name: Cargo publish
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Determine which flags to use on cargo publish
id: cargo_flags
run: |
set -x
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)
if [ "${BRANCH_NAME}" == "main" ]; then
echo "dry_run=false" >> $GITHUB_OUTPUT
echo "fail_if_version_published=false" >> $GITHUB_OUTPUT
elif [[ "${BRANCH_NAME}" == release/* ]]; then
echo "dry_run=false" >> $GITHUB_OUTPUT
echo "fail_if_version_published=false" >> $GITHUB_OUTPUT
else
echo "dry_run=true" >> $GITHUB_OUTPUT
echo "fail_if_version_published=true" >> $GITHUB_OUTPUT
fi
- name: Publish or validate
uses: ./.github/actions/publish-crate
with:
dry-run: ${{ steps.cargo_flags.outputs.dry_run }}
fail-if-version-published: ${{ steps.cargo_flags.outputs.fail_if_version_published }}
cargo-registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}