Skip to content

Commit

Permalink
fix login and publish (#1440)
Browse files Browse the repository at this point in the history
  • Loading branch information
Emilgardis authored Feb 6, 2024
2 parents e57a617 + 5ecc7bf commit f272b47
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/actions/cargo-publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@ runs:
${{ runner.temp }}/artifacts

- name: Log into crates.io
if: github.event_name != 'pull_request' && github.event_name != 'merge_group' && github.event_name != 'issue_comment'
run: cargo login -- ${{ inputs.cargo-registry-token }}
if: >
github.event_name == 'push' && (
github.ref == format('refs/heads/{0}', github.event.repository.default_branch) ||
startsWith(github.ref, 'refs/tags/v')
)
run: cargo login ${{ inputs.cargo-registry-token }}
shell: bash

- run: gh release delete --yes Unreleased || exit 0
Expand Down

0 comments on commit f272b47

Please sign in to comment.