mikeal / merge-release

Automatically release all merges to master on npm.
Other
471 stars 64 forks source link

Add support for publishing a package that isn't at repo root #7

Open adrw opened 4 years ago

adrw commented 4 years ago

Unblocks using this Github Action in a repo where the package to publish isn't at the root directory of the repo. For example, if a repo has a package in ./packages/my-package.

mikeal commented 4 years ago

Looks great but can we document it as its own feature beneath the default usage?

geoperez commented 4 years ago

Looking forward to getting this feature! Great work!

bayssmekanique commented 4 years ago

This PR would be a great addition if we could get it merged.

If anyone is looking to use this now, you can use @adrw's branch, but be warned it doesn't have some of the newer features like the release creation.

      - name: Publish
        if: github.ref == 'refs/heads/master'
        uses: adrw/merge-release@adrw/20191119.pkgDir
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
          PACKAGE_PATH: ./dist

As an added note, this will not publish from the directory passed in to PACKAGE_PATH, it will still call all commands from the project root.

adrw commented 4 years ago

@bayssmekanique Thanks for your feedback, updated the PR accordingly so that commands will be run in the $PACKAGE_PATH directory. I think it's ready to merge if no other feedback 🎉

kf6kjg commented 4 years ago

This looks to have been resolved by #19.