ci: release please (#203)
This commit is contained in:
parent
842fc4d40a
commit
8a9e06448b
2 changed files with 57 additions and 0 deletions
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
@ -21,6 +21,7 @@ jobs:
|
||||||
otp-version: ${{matrix.otp}}
|
otp-version: ${{matrix.otp}}
|
||||||
elixir-version: ${{matrix.elixir}}
|
elixir-version: ${{matrix.elixir}}
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v3
|
||||||
|
id: cache
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
deps
|
deps
|
||||||
|
@ -95,6 +96,7 @@ jobs:
|
||||||
otp-version: 25.x
|
otp-version: 25.x
|
||||||
elixir-version: 1.14.x
|
elixir-version: 1.14.x
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v3
|
||||||
|
id: cache
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
deps
|
deps
|
||||||
|
|
55
.github/workflows/release.yaml
vendored
Normal file
55
.github/workflows/release.yaml
vendored
Normal file
|
@ -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
|
Reference in a new issue