stackblitz-labs / pkg.pr.new

📦️ Continuous (Preview) Releases for your libraries!
https://pkg.pr.new
MIT License
1.21k stars 50 forks source link

GitHub Action? #225

Open mmkal opened 2 months ago

mmkal commented 2 months ago

Given this is supposed to be used from GitHub action workflows (exclusively?), it doesn't seem necessary to tell all users to do npm install pkg-pr-new.

What if we could just add uses: stackblitz-labs/pkg.pr.new@v0 to a GitHub Actions workflow. e.g.

name: ci
on: [push, pull_request]
jobs:
  run:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npm install
      - run: npm run build
      - uses: stackblitz-labs/pkg.pr.new@v0

Under the hood it could probably just do npx pkg-pr-new@latest anyway, but it'd mean that it'd be just one step to add to a repo - also you'd see that it's owned by stackblitz and therefore probably pretty safe to use.

Aslemammad commented 2 months ago

I'm thinking about this, it's solid, how can we handle options at that point? like compact, templates and projects?

mmkal commented 2 months ago

how can we handle options at that point? like compact, templates and projects?

      - uses: stackblitz-labs/pkg.pr.new@v0
        with:
          projects: 'packages/*'
          template: foo
          compact: true
          comment: create

Or maybe keep it simpler:

      - uses: stackblitz-labs/pkg.pr.new@v0
        with:
          args: 'packages/* --template foo --compact --comment=create'