-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* make cleaner workflow * try and fix it all * remove prod workflow * add missing dependencies * try e2e install * make it release ready * only run release on main push
- Loading branch information
Barthélémy Ledoux
authored
Dec 1, 2023
1 parent
5146209
commit 23abf26
Showing
6 changed files
with
182 additions
and
55 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,45 @@ | ||
name: Build | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
nonce: | ||
type: string | ||
required: true | ||
|
||
jobs: | ||
cypress-run: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout branch | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 18.x | ||
|
||
- name: Remove Postinstall Script | ||
run: npm pkg set scripts.postinstall="echo no-postinstall" | ||
|
||
- name: Install Dependencies | ||
run: yarn install --frozen-lockfile | ||
env: | ||
CI: true | ||
|
||
- name: Generate icon files | ||
run: | | ||
yarn turbo run build --filter=@cypress-design/css | ||
yarn workspace @cypress-design/icon-registry svg-to-ts-constants | ||
yarn workspace @cypress-design/icon-registry node ./build-icons.mjs | ||
- name: Build Components | ||
run: yarn run build:components | ||
|
||
- name: Cache node_modules and built dist files | ||
uses: actions/cache@v3 | ||
with: | ||
key: ${{ inputs.nonce }} | ||
path: | | ||
./components | ||
./node_modules |
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
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
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,76 @@ | ||
name: Workflow | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
types: [opened, reopened, synchronize, ready_for_review] | ||
|
||
concurrency: | ||
group: test-${{ github.ref_name }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
make-nonce: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
nonce: ${{ steps.nonce.outputs.nonce }} | ||
steps: | ||
- name: Simplify branch name | ||
id: branch | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
const simpleBranchName = '${{ github.head_ref }}'.replace(/[^a-zA-Z0-9.-]/g, '').slice(0, 49) | ||
core.setOutput('simpleBranchName', simpleBranchName) | ||
- name: generate and Set nonce | ||
id: nonce | ||
run: | | ||
echo "nonce=${{ github.run_id }}-${{ github.run_attempt }}-${{ steps.branch.outputs.simpleBranchName }}" >> $GITHUB_OUTPUT | ||
echo "simpleBranchName=${{ steps.branch.outputs.simpleBranchName }}" >> $GITHUB_OUTPUT | ||
- name: Display | ||
run: echo ${{ toJSON(steps.nonce.outputs.nonce) }} | ||
|
||
build: | ||
name: Build | ||
needs: [make-nonce] | ||
uses: ./.github/workflows/build.yml | ||
secrets: inherit | ||
with: | ||
nonce: ${{ needs.make-nonce.outputs.nonce }} | ||
|
||
test: | ||
name: Test | ||
needs: [build, make-nonce] | ||
uses: ./.github/workflows/test.yml | ||
secrets: inherit | ||
with: | ||
nonce: ${{ needs.make-nonce.outputs.nonce }} | ||
|
||
e2e-test: | ||
name: E2E Test | ||
needs: [build, make-nonce] | ||
uses: ./.github/workflows/e2e-tests.yml | ||
secrets: inherit | ||
with: | ||
nonce: ${{ needs.make-nonce.outputs.nonce }} | ||
|
||
template-test: | ||
name: Template Test | ||
needs: [build, make-nonce] | ||
uses: ./.github/workflows/template-test.yml | ||
secrets: inherit | ||
with: | ||
nonce: ${{ needs.make-nonce.outputs.nonce }} | ||
|
||
release: | ||
name: Release | ||
if: github.ref == 'refs/heads/main' && github.event_name == 'push' | ||
needs: [build, make-nonce, test, e2e-test, template-test] | ||
uses: ./.github/workflows/release.yml | ||
secrets: inherit | ||
with: | ||
nonce: ${{ needs.make-nonce.outputs.nonce }} |
23abf26
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
cypress-design – ./
cypress-design-cypress-io.vercel.app
cypress-design-git-main-cypress-io.vercel.app
cypress-design.vercel.app
design.cypress.io