-
Notifications
You must be signed in to change notification settings - Fork 381
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: use GitHub Release to trigger the Hex releases (#684)
- Loading branch information
Showing
1 changed file
with
26 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,32 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
publish: | ||
name: Publish | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out | ||
uses: actions/checkout@v2 | ||
|
||
- name: Publish to Hex.pm | ||
uses: erlangpack/github-action@v1 | ||
env: | ||
HEX_API_KEY: ${{ secrets.HEX_API_KEY }} | ||
- uses: actions/checkout@v2 | ||
- name: Set up Elixir | ||
uses: erlef/setup-elixir@v1 | ||
with: | ||
elixir-version: '1.11' | ||
otp-version: '22.3' | ||
- name: Restore dependencies cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: deps | ||
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} | ||
restore-keys: ${{ runner.os }}-mix- | ||
- name: Install dependencies | ||
run: | | ||
mix local.rebar --force | ||
mix local.hex --force | ||
mix deps.get | ||
- name: Run Hex Publish | ||
run: mix hex.publish --yes | ||
env: | ||
HEX_API_KEY: ${{ secrets.HEX_API_KEY }} |