update ci.yml #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
check_commit_message: | ||
name: skips CI and prints cli message, without fail build badge | ||
runs-on: ubuntu-latest | ||
if: "contains(github.event.head_commit.message, '[skip ci]')" | ||
steps: | ||
- run: echo "no need to build, based from commit message" | ||
publish_to_hex: | ||
name: "Publish to Hex" | ||
runs-on: ubuntu-latest | ||
# doesn't contain "ci skip" in commit message | ||
if: "!contains(github.event.head_commit.message, '[skip ci]')" | ||
steps: | ||
run: | | ||
mix hex.config api_key ${{ secrets.HEX_API_KEY }} | ||
mix hex.publish --yes |