Skip to content

Publish an existing package to hex.pm when the version changes.

Notifications You must be signed in to change notification settings

synchronal/hex-publish-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

Hex Publish

This action publishes an Elixir package to Hex.pm.

Usage

env:
  ELIXIR_VERSION: "1.13.4"
  OTP_VERSION: "25.0.1"
jobs:
  publish:
  if: github.ref == 'refs/heads/main'
  needs:
    - test
  runs-on: ubuntu-20.04
  steps:
    - uses: actions/checkout@v3
    - name: Set up Elixir
      uses: erlef/setup-beam@v1
      with:
        elixir-version: ${{ env.ELIXIR_VERSION }}
        otp-version: ${{ env.OTP_VERSION }}
    - name: Publish to Hex
      uses: synchronal/hex-publish-action@v3
      with:
        name: my_library
        key: ${{ secrets.HEX_PM_KEY }}
        tag-release: false

Configuration

  • name (required) - The name of the library.
  • key (required) - A hex.pm key with API Write access.
  • organization - An organization name for publishing private packages. (Note: this is not well-tested)
  • working_directory- (default: .) - The directory or subdirectory from which to publish.

Caveats

  • This action will not publish the first release of a library.

Deployment workflow

  • Make changes, commit them and push them (yolo!)
  • git tag -a -m "Description of changes" v2
  • git push --follow-tags
  • Update a project to use the new version
  • When it fails, update the tag?

About

Publish an existing package to hex.pm when the version changes.

Resources

Stars

Watchers

Forks

Packages

No packages published