-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: add structured release process
- Loading branch information
1 parent
38e0aaf
commit b498aa5
Showing
11 changed files
with
131 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
on: | ||
workflow_call: | ||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup | ||
uses: ./.github/workflows/setup | ||
- name: Build | ||
# Linting has already been validated so skip to improve build speed | ||
run: yarn build --no-lint | ||
working-directory: packages/www |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
on: | ||
workflow_call: | ||
jobs: | ||
check: | ||
name: Check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup | ||
uses: ./.github/workflows/setup | ||
- name: Check formatting | ||
run: yarn format:check | ||
working-directory: packages/www |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
on: | ||
workflow_call: | ||
jobs: | ||
check: | ||
name: Check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup | ||
uses: ./.github/workflows/setup | ||
- name: Check linting | ||
run: yarn lint:check | ||
working-directory: packages/www |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Pull Request | ||
on: | ||
pull_request: | ||
branches: | ||
- "!release-please*/*" | ||
jobs: | ||
format: | ||
name: Format | ||
uses: ./.github/workflows/format.yml | ||
lint: | ||
name: Lint | ||
uses: ./.github/workflows/lint.yml | ||
build: | ||
name: Build | ||
needs: [format, lint] | ||
uses: ./.github/workflows/build.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Push main | ||
on: | ||
push: | ||
branches: main | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
outputs: | ||
release_created: ${{ steps.release.outputs.release_created }} | ||
steps: | ||
- uses: google-github-actions/release-please-action@v4 | ||
id: release | ||
with: | ||
config-file: release-please-config.json | ||
manifest-file: release-please-manifest.json | ||
token: ${{ secrets.RELEASE_PLEASE_TOKEN }} | ||
format: | ||
name: Format | ||
needs: release | ||
if: ${{ needs.release.outputs.release_created }} | ||
uses: ./.github/workflows/format.yml | ||
lint: | ||
name: Lint | ||
needs: release | ||
if: ${{ needs.release.outputs.release_created }} | ||
uses: ./.github/workflows/lint.yml | ||
build: | ||
name: Build | ||
needs: [release, format, lint] | ||
if: ${{ needs.release.outputs.release_created }} | ||
uses: ./.github/workflows/build.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Setup | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Setup Node.js environment | ||
uses: actions/setup-node@v4 | ||
with: | ||
cache: yarn | ||
cache-dependency-path: packages/www/yarn.lock | ||
node-version-file: packages/www/package.json | ||
- name: Restore Next.js build cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: packages/www/.next/cache | ||
# Generate a new cache whenever packages or source files change | ||
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }} | ||
# If source files changed but packages didn't, rebuild from a prior cache | ||
restore-keys: ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}- | ||
- name: Install dependencies | ||
run: yarn install | ||
shell: bash | ||
working-directory: packages/www |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
.next | ||
|
||
CHANGELOG.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"packages": { | ||
"packages/www": {} | ||
}, | ||
"plugins": [ | ||
{ | ||
"type": "sentence-case" | ||
} | ||
], | ||
"pull-request-header": ":robot: Release Please says *\"I have created a new release\"*" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |