Skip to content

Commit

Permalink
Update release.yaml
Browse files Browse the repository at this point in the history
Fix publish ci
  • Loading branch information
nhudson authored Dec 22, 2023
1 parent d59a364 commit 73b1c35
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ on:
push:
tags:
- 'v*'
release:
types: [published]

jobs:
cargo-publish:
name: Cargo publish
Expand All @@ -15,24 +12,7 @@ jobs:
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 }}

0 comments on commit 73b1c35

Please sign in to comment.