Skip to content

Commit

Permalink
just checking if pr.pkg.new is working
Browse files Browse the repository at this point in the history
  • Loading branch information
theoephraim committed Aug 2, 2024
1 parent 71228d7 commit ed02969
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/six-hotels-clean.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@dmno/remix-integration": patch
---

update remix integration'
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,18 @@ jobs:
issues: write
pull-requests: write
env:
DMNO_STAFF: "theoephraim philmillman"
# pre-approved maintainers list (dmno staff)
MAINTAINERS_LIST: "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
if [[ "${MAINTAINERS_LIST}" =~ "$PR_AUTHOR" ]]; then
echo "Authored by pre-approved maintainer"
echo "official-maintainer=true" >> $GITHUB_OUTPUT
else
echo "Authored by DMNO staff"
echo "Authored by DMNO community member!"
fi
- name: Label PR
uses: actions/github-script@v5
Expand All @@ -36,5 +37,5 @@ jobs:
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' ]
labels: [ {{ steps.check_author.outputs.official-maintainer && 'maintainer' || 'community' }} ]
});
7 changes: 7 additions & 0 deletions .github/workflows/release-preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
# by default only the current commit is fetched
# but we need more history to be able to compare to main
fetch-depth: 0
- name: Enable Corepack
run: corepack enable
- name: Use Node.js 20.x
Expand All @@ -20,6 +24,9 @@ jobs:
- name: Build publishable DMNO modules
run: pnpm build:libs

- run: git diff --name-only origin/main HEAD
- run: git rev-parse --abbrev-ref HEAD

# we use a custom script to run `npx pkg-pr-new publish`
# so that we can determine which packages to release
- name: Release preview pacakges
Expand Down
2 changes: 2 additions & 0 deletions packages/integrations/remix/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ export function dmnoRemixVitePlugin(dmnoOptions?: DmnoPluginOptions) {

// this function will get called on each restart!
async config(config, env) {
console.log('testing pr.pkg.new!');

// console.log('vite config hook', config, env);
// remix loads 2 vite servers, one for frontend, one for back
// this feels hacky to identify it but seems to be working ok
Expand Down

0 comments on commit ed02969

Please sign in to comment.