Skip to content

Commit

Permalink
update rr busy with new action
Browse files Browse the repository at this point in the history
GitOrigin-RevId: d3b351929731251abfc4e72c2c40c2b8ec44bec4
  • Loading branch information
f authored and actions-user committed Sep 19, 2024
1 parent 46e9683 commit f388959
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 14 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/packages.react-router-busy.integrate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Integrate

on:
pull_request:

# Don't run integrate checks multiple times at once, only most recent matters since validating all code
concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
quality:
if: github.repository == 'bitofbreeze/react-router-busy'
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Biome
uses: biomejs/setup-biome@v2
with:
version: latest
- name: Run Biome
run: biome ci .
validate:
needs: [quality]
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Bun
uses: oven-sh/[email protected]
with:
bun-version: latest
- name: Install dependencies (`npm ci`)
run: bun install --frozen-lockfile
- name: Test
run: bun test --filter react-router-busy --coverage
# Build checks types so no need for separate typecheck step
- name: Build
run: bun --filter react-router-busy build
- name: Check exports
run: bun --filter react-router-busy check-exports
13 changes: 2 additions & 11 deletions .github/workflows/packages.react-router-busy.release.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
name: Release

on:
# pull_request:
# push:
# branches:
# - main
# paths:
# # This is fine for merging PR which is a push to main because changesets updates package's changelog and package.json to trigger this
# - 'packages/react-router-busy/**'
workflow_dispatch:

permissions:
Expand All @@ -17,8 +10,9 @@ permissions:
concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
# Still need to run all steps of validation here because integrate action only verifies code from PRs but I'm pushing to main, so want to not release on bad code I did
quality:
if: github.repository == 'bitofbreeze/mono'
if: github.repository == 'bitofbreeze/react-router-busy'
runs-on: ubuntu-latest
steps:
- name: Check out code
Expand Down Expand Up @@ -51,11 +45,8 @@ jobs:
- name: Check exports
run: bun --filter react-router-busy check-exports
release:
# Only make release when pushing (to main)
if: github.event_name == 'push'
needs: [validate]
runs-on: ubuntu-latest
# https://github.com/changesets/action/issues/179#issuecomment-1139116421
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
Expand Down
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

Bun monorepos are a bit undeveloped and undocumented. Some common commands you'll need are:
* bun i typescript --cwd=apps/app2
* bun --filter git-sell dev
* bun --cwd apps/git-sell ngrok http 5173 --domain=pleased-manually-lab.ngrok-free.app
* bun --filter=git-sell dev
* bun --cwd=apps/git-sell ngrok http 5173 --domain=pleased-manually-lab.ngrok-free.app

## Workflow

Copybara mirrors some packages to their own repos, for example, react-router-busy.

PRs coming to react-router-busy are mirrored back to the monorepo and are merged there, which then deletes them from react-router-busy and finally pushes those changes back to react-router-busy.

Only commits in the monorepo that affect any files mirrored to react-router-busy are reflected there. Changes are only pushed to react-router-busy once a week to conserve free Action minutes.

Releasing is done in the package's mirrored repo, eg, react-router-busy. This makes GitHub releases and tags show for everyone since the monorepo is private. This is also more cost effective since Action minutes don't count for public repos. This is also fine because semantic-release promotes [not making commits during release to reduce complexity](https://semantic-release.gitbook.io/semantic-release/support/faq#making-commits-during-the-release-process-adds-significant-complexity).
3 changes: 2 additions & 1 deletion packages/react-router-busy/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "react-router-busy",
"//version": "Not used https://semantic-release.gitbook.io/semantic-release/support/faq#why-is-the-package.jsons-version-not-updated-in-my-repository",
"version": "0.0.0",
"description": "Accessible busy state for react-router forms and links",
"keywords": [
Expand All @@ -18,7 +19,7 @@
"repository": {
"type": "git",
"//url": "Semantic Release uses this to get the code, and mirror might not be updated since separate action + needs token while private, but also this might be where tags are published and we do want it in mirrored one",
"url": "git+https://github.com/bitofbreeze/mono.git"
"url": "git+https://github.com/bitofbreeze/react-router-busy.git"
},
"license": "MIT",
"files": ["build", "src"],
Expand Down

0 comments on commit f388959

Please sign in to comment.