Giter Club home page Giter Club logo

pkg.pr.new's Introduction

pkg.pr.new

We call it "Continuous Releases" too.

With pkg.pr.new, each of your commits and pull requests would trigger an instant release. This enables users to access features and bug-fixes without the need to wait for release cycles using npm or pull request merges.

  • ๐Ÿš€ Instant Builds
  • ๐Ÿ› ๏ธ Github Workflows Friendly
  • ๐Ÿ“ฆ๏ธ No Configuration
  • ๐Ÿ”ฉ Single Command
  • โœ‰๏ธ Pull Request Comments
  • ๐Ÿ”ฅ Check Runs

pkg.pr.new is aiming to reduce the number of these comments :)

This was fixed in #18. Can we release that fix?

Will ask the maintainer to release ;)

Setup

The Github Application is available here.

After installing on your repository, you can run npx pkg-pr-new pulibsh with GITHUB_TOKEN in your workflows and then you have continuous releases!

npm install --save-dev pkg-pr-new

Examples

  • Release each commit and pull request:
name: Publish Any Commit
on: [push, pull_request]

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout code
        uses: actions/checkout@v2

      - run: corepack enable
      - uses: actions/setup-node@v4
        with:
          node-version: 20
          cache: "pnpm"

      - name: Install dependencies
        run: pnpm install

      - name: Build
        run: pnpm build

      - run: pnpm pkg-pr-new publish
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # GITHUB_TOKEN is provided automatically in any repository
  • Release approved pull requests only:
name: Publish Approved Pull Requests
on:
  pull_request_review:
    types: [submitted]

jobs:
  approved:
    if: github.event.review.state == 'APPROVED'
    runs-on: ubuntu-latest

    steps:
      - name: Checkout code
        uses: actions/checkout@v2

      - run: corepack enable
      - uses: actions/setup-node@v4
        with:
          node-version: 20
          cache: "pnpm"

      - name: Install dependencies
        run: pnpm install

      - run: pnpm pkg-pr-new publish
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Releasing approved pull requests is the recommended way of having continuous releases. This ensures users always install approved and safe packages.

Publishing is only available in workflows and it supports any workflow trigger event, more information here.

pkg.pr.new's People

Contributors

aslemammad avatar amirsa12 avatar apai4 avatar

Stargazers

enrique r grullon avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.