initial release v0.0.1 #3
Workflow file for this run
This file contains hidden or 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: Release | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| jobs: | |
| publish: | |
| name: Publish to Hex.pm | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Elixir | |
| uses: erlef/setup-beam@v1 | |
| with: | |
| otp-version: '27.3.3' | |
| elixir-version: '1.18.3' | |
| - name: Cache deps and build | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| deps | |
| _build | |
| key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-mix- | |
| - name: Install dependencies | |
| run: | | |
| echo "Installing dependencies..." | |
| mix deps.get || (echo "Failed to install dependencies!" && exit 1) | |
| - name: Run tests | |
| run: | | |
| echo "Running tests..." | |
| mix test || (echo "Tests failed!" && exit 1) | |
| - name: Check formatting | |
| run: | | |
| echo "Running mix format check..." | |
| mix format --check-formatted || (echo "Format check failed!" && exit 1) | |
| - name: Run Credo | |
| run: | | |
| echo "Running Credo..." | |
| mix credo --strict || (echo "Credo check failed!" && exit 1) | |
| - name: Publish to Hex.pm | |
| env: | |
| HEX_API_KEY: ${{ secrets.HEX_API_KEY }} | |
| run: | | |
| echo "Publishing to Hex.pm..." | |
| mix hex.publish --yes || (echo "Failed to publish to Hex.pm!" && exit 1) |