Skip to content

Commit

Permalink
Skip crate publishing if there have been no changes
Browse files Browse the repository at this point in the history
  • Loading branch information
AzureMarker committed Jun 6, 2021
1 parent 6d0ddc5 commit ea5bf4c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ jobs:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
shell: bash
run: |
export CHANGED=$(cargo workspaces changed --ignore-changes "**/Cargo.toml")
if [[ -z "$CHANGED" ]]; then
# Nothing has changed, so don't publish a new version
exit 0
fi
git config --global user.email "runner@gha.local"
git config --global user.name "Github Action"
cargo workspaces -v version -ay --force '*' --include-merged-tags --no-git-commit --exact patch
Expand Down

0 comments on commit ea5bf4c

Please sign in to comment.