v2.0.0-rc.0 #1
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: | |
| release: | |
| types: [published] | |
| env: | |
| MIX_ENV: dev | |
| REQUIRE_VERSION_FILE: true | |
| CACHE_PREFIX_DEPS: v1-deps | |
| CACHE_PREFIX_BUILD: v1-_build | |
| jobs: | |
| publish_to_hex: | |
| name: Publish to Hex.pm | |
| runs-on: ubuntu-latest | |
| container: hexpm/elixir:1.18.4-erlang-27.3.4.1-alpine-3.22.0 | |
| env: | |
| VERSION_ALPINE: 3.22.0 | |
| VERSION_ELIXIR: 1.18.4 | |
| VERSION_OTP: 27.3.4.1 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Write the release version to the version file | |
| run: | | |
| echo "Create version file for $GITHUB_REF" | |
| echo -n "${GITHUB_REF#refs/tags/v}" > version | |
| - name: Cache - deps/ | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| deps | |
| key: elixir-deps-${{ runner.os }}-${{ hashFiles('mix.lock') }}-${{ hashFiles('.tool-versions') }}-${{ hashFiles('lib/**/*.ex', 'lib/**/*.*ex', 'config/*.exs', 'mix.exs') }} | |
| restore-keys: | | |
| elixir-deps-${{ runner.os }}-${{ hashFiles('mix.lock') }}- | |
| elixir-deps-${{ runner.os }} | |
| - name: Install Dependencies | |
| run: | | |
| mix local.rebar --force | |
| mix local.hex --force | |
| mix deps.get --only "$MIX_ENV" | |
| - name: Cache - _build/ | |
| uses: actions/cache@v4 | |
| with: | |
| path: _build/ | |
| key: ${{ env.CACHE_PREFIX_BUILD }}-env:${{ env.MIX_ENV }}-alpine:${{ env.VERSION_ALPINE }}-elixir:${{ env.VERSION_ELIXIR }}-otp:${{ env.VERSION_OTP }}-${{ hashFiles('**/mix.lock') }} | |
| restore-keys: ${{ env.CACHE_PREFIX_BUILD }}-env:${{ env.MIX_ENV }}-alpine:${{ env.VERSION_ALPINE }}-elixir:${{ env.VERSION_ELIXIR }}-otp:${{ env.VERSION_OTP }}- | |
| - run: mix compile --warnings-as-errors | |
| - name: Publish to Hex.pm | |
| run: mix hex.publish --yes | |
| env: | |
| HEX_API_KEY: ${{ secrets.HEX_API_KEY }} |