diff --git a/.github/workflows/hex_publish.yml b/.github/workflows/hex_publish.yml new file mode 100644 index 0000000..a2d9d60 --- /dev/null +++ b/.github/workflows/hex_publish.yml @@ -0,0 +1,23 @@ +--- +name: Publish to Hex.pm +on: + push: + tags: + - '*' + +jobs: + publish: + runs-on: ubuntu-latest + container: erlang:27 + + steps: + - name: Check out + uses: actions/checkout@v4 + + - name: 'Fix up git directory ownership (see https://github.com/actions/checkout/issues/1049)' + run: git config --global --add safe.directory '*' + + - name: Publish to Hex.pm + env: + HEX_API_KEY: ${{ secrets.HEX_API_KEY }} + run: rebar3 hex publish package -r hexpm --yes diff --git a/rebar.config b/rebar.config index 6dd24f5..3351c62 100644 --- a/rebar.config +++ b/rebar.config @@ -54,3 +54,5 @@ ]} ]} ]}. + +{project_plugins, [rebar3_hex]}.