From a49dc98a80026abb95c24dd476a67a7533cb18ae Mon Sep 17 00:00:00 2001 From: winston Date: Mon, 30 Oct 2023 13:23:41 +0100 Subject: [PATCH] ci: prepare yarn v4 --- .github/workflows/chromatic.yml | 8 ++++---- .github/workflows/ci.yml | 7 ++++--- .github/workflows/release-please.yml | 23 ++++++++++------------- package.json | 2 +- 4 files changed, 19 insertions(+), 21 deletions(-) diff --git a/.github/workflows/chromatic.yml b/.github/workflows/chromatic.yml index 72b52300..2161c046 100644 --- a/.github/workflows/chromatic.yml +++ b/.github/workflows/chromatic.yml @@ -1,4 +1,4 @@ -on: +on: push: branches: [main] paths: @@ -20,10 +20,11 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: 18 cache: yarn + - run: corepack enable - name: Install dependencies & build run: | yarn install --immutable @@ -31,5 +32,4 @@ jobs: - name: Publish to Chromatic uses: chromaui/action@v1 with: - projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} - exitOnceUploaded: true \ No newline at end of file + exitOnceUploaded: true diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c1591559..71476eb8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,11 +8,12 @@ jobs: lint-and-build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: 18 cache: yarn + - run: corepack enable - name: Install dependencies & build run: | yarn install --immutable @@ -30,4 +31,4 @@ jobs: uses: actions/upload-artifact@v3 with: name: catppuccin-vsc.vsix - path: ${{ steps.packageExtension.outputs.vsixPath }} \ No newline at end of file + path: ${{ steps.packageExtension.outputs.vsixPath }} diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 754bbd48..91653b56 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -16,24 +16,27 @@ jobs: id: release with: release-type: node + outputs: + release_created: ${{ steps.release.outputs.release_created }} - - uses: actions/checkout@v3 - if: ${{ steps.release.outputs.release_created }} - - - uses: actions/setup-node@v3 - if: ${{ steps.release.outputs.release_created }} + release: + runs-on: ubuntu-latest + needs: release-please + if: ${{ needs.release-please.outputs.release_created }} + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: 18 cache: yarn + - run: corepack enable - name: Build - if: ${{ steps.release.outputs.release_created }} run: | yarn install --immutable yarn build - name: Publish to orphaned branch - if: ${{ steps.release.outputs.release_created }} uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} @@ -42,12 +45,9 @@ jobs: user_name: 'github-actions[bot]' user_email: 'github-actions[bot]@users.noreply.github.com' exclude_assets: ".flag" - # this is here because we're not using the Action for it's main purpose (GH pages) - # we're not interested in preventing Jekyll (creating a `.nojekyll` file) enable_jekyll: true - name: Package Extension - if: ${{ steps.release.outputs.release_created }} id: packageExtension uses: HaaLeo/publish-vscode-extension@v1 with: @@ -56,7 +56,6 @@ jobs: dryRun: true - name: Publish to Visual Studio Marketplace - if: ${{ steps.release.outputs.release_created }} uses: HaaLeo/publish-vscode-extension@v1 with: yarn: true @@ -65,7 +64,6 @@ jobs: registryUrl: https://marketplace.visualstudio.com - name: Publish to Open VSX Registry - if: ${{ steps.release.outputs.release_created }} uses: HaaLeo/publish-vscode-extension@v1 # continue even if OpenVSX fails continue-on-error: true @@ -77,7 +75,6 @@ jobs: extensionFile: ${{ steps.packageExtension.outputs.vsixPath }} - name: Add fils to GH Release - if: ${{ steps.release.outputs.release_created }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: diff --git a/package.json b/package.json index f51dff0d..de199009 100644 --- a/package.json +++ b/package.json @@ -202,7 +202,7 @@ "scripts": { "build": "yarn compile:theme && yarn compile", "build-storybook": "storybook build", - "chromatic": "chromatic --exit-zero-on-changes --exit-once-uploaded", + "chromatic": "chromatic --exit-zero-on-changes --exit-once-uploaded --project-token chpt_e3cba49738d7554", "compile": "tsup", "compile:theme": "ts-node src/hooks/generateThemes.ts", "dev": "DEBUG=1 yarn build",