v0.13.1 #23
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: StellarBase CD | |
on: | |
release: | |
types: | |
[published] | |
permissions: # added using https://github.com/step-security/secure-workflows | |
contents: read | |
jobs: | |
publish: | |
name: Publish Release to HEX PM | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
otp: ['23.3'] | |
elixir: ['1.11'] | |
env: | |
HEX_API_KEY: ${{ secrets.HEX_API_KEY }} | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@cba0d00b1fc9a034e1e642ea0f1103c282990604 # v2.5.0 | |
with: | |
disable-sudo: true | |
egress-policy: block | |
allowed-endpoints: > | |
github.com:443 | |
hex.pm:443 | |
repo.hex.pm:443 | |
builds.hex.pm:443 | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
- uses: erlef/setup-elixir@61e01a43a562a89bfc54c7f9a378ff67b03e4a21 # v1.16.0 | |
with: | |
otp-version: ${{ matrix.otp }} | |
elixir-version: ${{ matrix.elixir }} | |
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 | |
with: | |
path: deps | |
key: ${{ runner.os }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} | |
restore-keys: | | |
${{ runner.os }}-mix- | |
- name: Install Dependencies | |
run: | | |
rm -rf deps _build | |
mix deps.get | |
- name: Publish | |
run: HEX_API_KEY=$HEX_API_KEY mix hex.publish --yes |