diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..998f5ff --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,36 @@ +name: Release + +on: + release: + types: [published] + +jobs: + publish: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - pair: + elixir-version: 1.15 + otp-version: 26.0 + lint: lint + steps: + - uses: actions/checkout@v3 + - name: Set up Elixir + uses: erlef/setup-beam@v1 + with: + elixir-version: ${{matrix.pair.elixir-version}} + otp-version: ${{matrix.pair.otp-version}} + - name: Restore elixir dependencies cache + uses: actions/cache@v3 + with: + path: deps + key: ${{runner.os}}-mix-${{matrix.elixir-version}}-${{matrix.otp-version}}-${{hashFiles('**/mix.lock')}} + restore-keys: ${{runner.os}}-mix-${{matrix.elixir-version}}-${{matrix.otp-version}}- + - name: Install dependencies + run: mix deps.get + - name: Publish to Hex + run: mix hex.publish --yes + env: + HEX_API_KEY: ${{secrets.HEX_API_KEY}}