Skip to content

Commit

Permalink
chore: add pkg.pr.new (#229)
Browse files Browse the repository at this point in the history
  • Loading branch information
userquin authored Aug 14, 2024
1 parent bc82974 commit 0762cff
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 3 deletions.
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/[email protected]

- name: Install dependencies
run: pnpm install

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

- run: pnpm dlx [email protected] 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 <[email protected]>",
"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

0 comments on commit 0762cff

Please sign in to comment.