-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(.github): split out steps into separate actions, consolidate push …
…and pull files
- Loading branch information
1 parent
63afc20
commit 87033f6
Showing
9 changed files
with
140 additions
and
135 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,9 @@ | ||
name: 'Checkout Code' | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 |
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,9 @@ | ||
name: 'Install Playwright and Dependencies' | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
# - name: Install Playwright Browsers | ||
# run: npx playwright install --with-deps | ||
- name: Install dependencies | ||
run: pnpm install |
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,27 @@ | ||
name: 'Release' | ||
|
||
inputs: | ||
github-token: | ||
required: true | ||
npm-token: | ||
required: true | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Config Git User | ||
run: | | ||
git config --global user.name "${{ github.actor }}" | ||
git config --global user.email "${{ github.actor }}@users.noreply.github.com" | ||
env: | ||
GITHUB_TOKEN: ${{ inputs.github-token }} | ||
|
||
- name: NPM Registry Authentication | ||
run: | | ||
npm config set '//registry.npmjs.org/:_authToken' ${{ inputs.npm-token }} | ||
- name: Bump Versions | ||
run: pnpm version:ci | ||
|
||
- name: Publish Packages | ||
run: pnpm publish:ci |
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,10 @@ | ||
name: 'Run NX Affected' | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: NX Affected | ||
uses: nrwl/nx-set-shas@v4 | ||
|
||
- name: Build, Lint, Test | ||
run: npx nx affected -t build,lint,test --parallel=3 |
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 @@ | ||
name: 'Setup Node.js' | ||
inputs: | ||
node-version: | ||
required: true | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ inputs.node-version }} |
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,28 @@ | ||
name: 'Setup pnpm and Cache' | ||
|
||
inputs: | ||
pnpm-version: | ||
required: true | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: ${{ inputs.pnpm-version }} | ||
run_install: false | ||
|
||
- name: Get pnpm store directory | ||
id: pnpm-cache | ||
shell: bash | ||
run: | | ||
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | ||
- name: Setup pnpm cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- |
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,46 @@ | ||
name: CICD Workflow | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
env: | ||
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} | ||
|
||
jobs: | ||
build-and-test: | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
matrix: | ||
node-version: [20] | ||
pnpm-version: [8] | ||
steps: | ||
- name: Checkout Code | ||
uses: waldronmatt/groundwork/.github/actions/checkout.yml | ||
|
||
- name: Setup Node.js | ||
uses: waldronmatt/groundwork/.github/actions/setup-node.yml | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Setup pnpm and Cache | ||
uses: waldronmatt/groundwork/.github/actions/setup-pnpm.yml | ||
with: | ||
pnpm-version: ${{ matrix.pnpm-version }} | ||
|
||
- name: Install Playwright and Dependencies | ||
uses: waldronmatt/groundwork/.github/actions/install-deps.yml | ||
|
||
- name: Run NX Affected Commands | ||
uses: waldronmatt/groundwork/.github/actions/run-affected.yml | ||
|
||
- name: Publish Packages | ||
if: github.event_name == 'push' | ||
uses: waldronmatt/groundwork/.github/actions/publish.yml | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
npm-token: ${{ secrets.NPM_TOKEN }} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.