Skip to content

UseKeyp/publish-pr-packages

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

Repository files navigation

Welcome to Publish PR Packages 👋

License: MIT

Auto-publish fresh packages for every pull request

Prerequisites

  1. This tool requires lerna for versioning and publishing. You must install it in the root of your repo with the following command:
yarn add --dev lerna
lerna init
  1. Next ensure your package.json includes the packages you want to publish in the workspaces:
{
  "workspaces": [
    "packages/*"
  ]
}
  1. You must also copy the /tasks directory to the root of your repo, then chmod +x each of them to allow for execution. I'm open to suggestions/contributions to help eliminate this step!

Usage

name: CI - Pull Request
on:
  pull_request:
    types: [opened, synchronize]
jobs:
  ci:
    name: PR Continuous Integration
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Source
        uses: actions/checkout@v3
      - name: Publish Package
        uses: UseKeyp/[email protected]
        with:
          # REQUIRED - Github Personal Access Token or Npm Auth Token 
          token: ${{ secrets.PAT }}
          # Command to build run for each package
          build-command: yarn build
          # Relative path to your package(s)
          packages-directory: packages
          # Which registry to use: github, npm
          registry: github 
          # Name which will appear in the installation instruction
          package-name: my-package

Sponsors ❤️

keyp-logo Improve onboarding and payments in your games & web3 apps effortlessly with OAuth logins for wallets and debit card transactions. Create a Keyp account; it's free!

License 📝

Copyright © 2023 Nifty Chess, Inc.
This project is MIT licensed.