Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add pkg.pr.new #229

Merged
merged 1 commit into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/publish-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Publish Any Commit

on:
push:
branches:
- main
issue_comment:
types: [created]

jobs:
build:
if: github.repository == 'antfu-collective/ni' && (github.event_name == 'push' || github.event.issue.pull_request && startsWith(github.event.comment.body, '/pkg-pr-new'))
runs-on: ubuntu-latest

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

- name: Install pnpm
uses: pnpm/action-setup@v4.0.0

- name: Install dependencies
run: pnpm install

- name: Build
working-directory: .
run: pnpm build

- run: pnpm dlx pkg-pr-new@0.0 publish --compact --pnpm .
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
"description": "Use the right package manager",
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
"license": "MIT",
"homepage": "https://github.com/antfu/ni#readme",
"homepage": "https://github.com/antfu-collective/ni#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/antfu/ni.git"
"url": "https://github.com/antfu-collective/ni.git"
},
"bugs": {
"url": "https://github.com/antfu/ni/issues"
"url": "https://github.com/antfu-collective/ni/issues"
},
"exports": {
".": {
Expand Down