Workflow file for this run
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
name: Publish package to Hex.pm | |
on: | |
release: | |
types: [published] | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up SSH key | |
uses: webfactory/[email protected] | |
with: | |
ssh-private-key: ${{ secrets.WTTJ_DEPLOYER }} | |
- uses: actions/checkout@v4 | |
- name: Set up Elixir | |
uses: erlef/setup-beam@v1 | |
with: | |
elixir-version: '1.17.2' | |
otp-version: '26.2.5.2' | |
- name: Extract library name and version | |
run: | | |
RELEASE_NAME=${{ github.event.release.tag_name }} | |
VERSION=$(echo $RELEASE_NAME | cut -d'v' -f2) | |
echo "LIB_NAME=$LIB_NAME" >> $GITHUB_ENV | |
echo "VERSION=$VERSION" >> $GITHUB_ENV | |
- name: Configure package access | |
run: | | |
mix local.hex --force | |
mix hex.organization auth wttj --key ${{ secrets.HEXPM_KEY }} | |
- name: Install dependencies | |
run: | | |
mix deps.get | |
- name: Publish to Hex.pm | |
env: | |
HEX_API_KEY: ${{ secrets.HEXPM_KEY }} | |
run: | | |
mix hex.publish --yes |