Merge pull request #10 from ipdata/claude/fix-issue-3Hl6Y #14
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: Publish to Hex.pm | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| otp: ['25', '26', '27'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: erlef/setup-beam@v1 | |
| with: | |
| otp-version: ${{ matrix.otp }} | |
| rebar3-version: '3.24' | |
| - name: Restore dependencies cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: _build | |
| key: ${{ runner.os }}-otp-${{ matrix.otp }}-build-${{ hashFiles('rebar.config') }} | |
| restore-keys: ${{ runner.os }}-otp-${{ matrix.otp }}-build- | |
| - name: Compile | |
| run: rebar3 compile | |
| - name: Run tests | |
| run: rebar3 ct | |
| - name: Run dialyzer | |
| run: rebar3 dialyzer | |
| - name: Run xref | |
| run: rebar3 xref | |
| publish: | |
| name: Publish to Hex.pm | |
| needs: test | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: erlef/setup-beam@v1 | |
| with: | |
| otp-version: '27' | |
| rebar3-version: '3.24' | |
| - name: Restore dependencies cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: _build | |
| key: ${{ runner.os }}-otp-27-build-${{ hashFiles('rebar.config') }} | |
| restore-keys: ${{ runner.os }}-otp-27-build- | |
| - name: Publish to Hex.pm | |
| run: rebar3 hex publish --repo hexpm --yes | |
| env: | |
| HEX_API_KEY: ${{ secrets.HEX_API_KEY }} | |
| - name: Generate and publish docs | |
| run: rebar3 hex publish docs --repo hexpm --yes | |
| env: | |
| HEX_API_KEY: ${{ secrets.HEX_API_KEY }} |