Skip to content

Commit

Permalink
ci: release please (#203)
Browse files Browse the repository at this point in the history
  • Loading branch information
mhanberg committed Jun 13, 2023
1 parent 842fc4d commit 8a9e064
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}
- uses: actions/cache@v3
id: cache
with:
path: |
deps
Expand Down Expand Up @@ -95,6 +96,7 @@ jobs:
otp-version: 25.x
elixir-version: 1.14.x
- uses: actions/cache@v3
id: cache
with:
path: |
deps
Expand Down
55 changes: 55 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Release
on:
push:
branches:
- main

permissions:
contents: write
pull-requests: write

jobs:
release:
name: release
runs-on: ubuntu-latest
strategy:
matrix:
otp: [25.3]
elixir: [1.14.x]
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
release-type: elixir
package-name: temple

- uses: actions/checkout@v3
if: ${{ steps.release.outputs.release_created }}

- uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}
if: ${{ steps.release.outputs.release_created }}

- uses: actions/cache@v3
id: cache
if: ${{ steps.release.outputs.release_created }}
with:
path: |
deps
_build
key: ${{ runner.os }}-mix-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-${{ matrix.otp }}-${{ matrix.elixir }}-
- name: Install Dependencies
if: steps.release.outputs.release_created && steps.cache.outputs.cache-hit != 'true'
run: mix deps.get

- name: publish to hex
if: ${{ steps.release.outputs.release_created }}
env:
HEX_API_KEY: ${{secrets.HEX_API_KEY}}
run: |
mix hex.publish --yes

0 comments on commit 8a9e064

Please sign in to comment.