diff --git a/.github/workflows/external-pr-labeler.yaml b/.github/workflows/external-pr-labeler.yaml new file mode 100644 index 00000000..ae417d66 --- /dev/null +++ b/.github/workflows/external-pr-labeler.yaml @@ -0,0 +1,40 @@ +# thanks to https://github.com/systeminit/si/blob/main/.github/workflows/community-check.yml + +name: Label community PR + +on: + pull_request_target: + types: + - opened + - synchronize + - reopened + +jobs: + check-is-community: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + env: + DMNO_STAFF: "theoephraim philmillman" + steps: + - name: Check PR author + id: check_author + run: | + PR_AUTHOR="${{ github.event.pull_request.user.login }}" + if ! [[ "${DMNO_STAFF}" =~ "$PR_AUTHOR" ]]; then + echo "Authored by DMNO community member!" + echo "requires-community-tag=true" >> $GITHUB_OUTPUT + else + echo "Authored by DMNO staff" + fi + - name: Label PR + uses: actions/github-script@v5 + with: + script: | + await github.rest.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: ${{ github.event.pull_request.number }}, + labels: [ steps.check_author.outputs.requires-community-tag && 'community' && 'staff' ] + }); diff --git a/.github/workflows/release-preview.yaml b/.github/workflows/release-preview.yaml new file mode 100644 index 00000000..1975ce66 --- /dev/null +++ b/.github/workflows/release-preview.yaml @@ -0,0 +1,23 @@ +name: Publish Any Commit +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Enable Corepack + run: corepack enable + - name: Use Node.js 20.x + uses: actions/setup-node@v4 + with: + node-version: "20.x" + cache: 'pnpm' + - name: Install node deps + run: pnpm i + + - name: Build + run: pnpm build + + - run: pnpx pkg-pr-new publish diff --git a/package.json b/package.json index a12297c3..7fbfcc85 100644 --- a/package.json +++ b/package.json @@ -26,8 +26,8 @@ "typescript": "^5.4.5" }, "engines": { - "node": "^18.17.1 || ^20.3.0 || >=21.0.0", - "pnpm": ">=9.1.1" + "node": "^20.3.0 || >=21.0.0", + "pnpm": ">=9.6.0" }, - "packageManager": "pnpm@9.1.1" + "packageManager": "pnpm@9.6.0" }