Skip to content

Commit faba6c4

Browse files
committed
just checking if pr.pkg.new is working
1 parent 71228d7 commit faba6c4

File tree

6 files changed

+28
-14
lines changed

6 files changed

+28
-14
lines changed

.changeset/config.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"linked": [ ],
77
"ignore": [ ],
88
"access": "public",
9-
"baseBranch": "main",
9+
"baseBranch": "origin/main",
1010
"updateInternalDependencies": "patch",
1111
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
1212
"onlyUpdatePeerDependentsWhenOutOfRange": true

.changeset/six-hotels-clean.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@dmno/remix-integration": patch
3+
---
4+
5+
update remix integration'

.github/workflows/external-pr-labeler.yaml renamed to .github/workflows/pr-labeler.yaml

+7-6
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,18 @@ jobs:
1616
issues: write
1717
pull-requests: write
1818
env:
19-
DMNO_STAFF: "theoephraim philmillman"
19+
# pre-approved maintainers list (dmno staff)
20+
MAINTAINERS_LIST: "theoephraim philmillman"
2021
steps:
2122
- name: Check PR author
2223
id: check_author
2324
run: |
2425
PR_AUTHOR="${{ github.event.pull_request.user.login }}"
25-
if ! [[ "${DMNO_STAFF}" =~ "$PR_AUTHOR" ]]; then
26-
echo "Authored by DMNO community member!"
27-
echo "requires-community-tag=true" >> $GITHUB_OUTPUT
26+
if [[ "${MAINTAINERS_LIST}" =~ "$PR_AUTHOR" ]]; then
27+
echo "Authored by pre-approved maintainer"
28+
echo "official-maintainer=true" >> $GITHUB_OUTPUT
2829
else
29-
echo "Authored by DMNO staff"
30+
echo "Authored by DMNO community member!"
3031
fi
3132
- name: Label PR
3233
uses: actions/github-script@v5
@@ -36,5 +37,5 @@ jobs:
3637
owner: context.repo.owner,
3738
repo: context.repo.repo,
3839
issue_number: ${{ github.event.pull_request.number }},
39-
labels: [ steps.check_author.outputs.requires-community-tag && 'community' && 'staff' ]
40+
labels: [ {{ steps.check_author.outputs.official-maintainer && 'maintainer' || 'community' }} ]
4041
});

.github/workflows/release-preview.yaml

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release preview packages
1+
name: Release _preview_ packages
22
on: [push, pull_request]
33

44
jobs:
@@ -7,6 +7,12 @@ jobs:
77

88
steps:
99
- uses: actions/checkout@v4
10+
- run: git fetch origin main
11+
with:
12+
# by default only the current commit is fetched
13+
# but we need more history to be able to compare to main
14+
# TODO: ideally we would just fetch the history between origin/main and the current commit
15+
fetch-depth: 0
1016
- name: Enable Corepack
1117
run: corepack enable
1218
- name: Use Node.js 20.x

.github/workflows/release.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release
1+
name: Release packages
22

33
on:
44
push:

scripts/release-preview.js

+7-5
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,30 @@ try {
66
// pnpm m ls --json --depth=-1 | node -e "const path = require('path'); console.log(JSON.parse(require('fs').readFileSync('/dev/stdin', 'utf-8')).map((m) => path.relative(__dirname, m.path)).filter(Boolean))"
77
const workspacePackagesInfoRaw = execSync('pnpm m ls --json --depth=-1');
88
const workspacePackagesInfo = JSON.parse(workspacePackagesInfoRaw);
9-
console.log(workspacePackagesInfo);
9+
// console.log(workspacePackagesInfo);
1010

1111
// generate sumamry of changed (publishable) modules according to changesets
1212
// only has option to output to a file
1313
execSync('pnpm exec changeset status --output=changesets-summary.json');
1414

1515
const changeSetsSummaryRaw = fs.readFileSync('./changesets-summary.json', 'utf8');
1616
const changeSetsSummary = JSON.parse(changeSetsSummaryRaw);
17-
console.log(changeSetsSummary);
17+
// console.log(changeSetsSummary);
1818

1919
const releasePackagePaths = changeSetsSummary.releases
2020
.filter((r) => r.newVersion !== r.oldVersion)
2121
.map((r) => workspacePackagesInfo.find((p) => p.name === r.name))
2222
.map((p) => p.path);
23-
console.log(releasePackagePaths);
23+
// console.log(releasePackagePaths);
24+
25+
const publishResult = execSync(`pnpm dlx pkg-pr-new publish --compact ${releasePackagePaths.join(' ')}`);
26+
console.log('published preview packages!')
27+
console.log(publishResult);
2428

25-
execSync(`pnpm dlx pkg-pr-new publish --compact ${releasePackagePaths.join(' ')}`);
2629
} catch (_err) {
2730
err = _err;
2831
console.error('preview release failed');
2932
console.error(_err);
3033
}
31-
console.log(`CWD = ${process.cwd()}`);
3234
fs.unlinkSync('./changesets-summary.json');
3335
process.exit(err ? 1 : 0);

0 commit comments

Comments
 (0)