From 2288bba1eeca06dfe6522b2758f30be09519fe7a Mon Sep 17 00:00:00 2001 From: Philipp Kief Date: Sat, 11 Nov 2023 10:02:08 +0100 Subject: [PATCH 1/3] Add puppeteer file icon --- icons/puppeteer.svg | 1 + src/icons/fileIcons.ts | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 icons/puppeteer.svg diff --git a/icons/puppeteer.svg b/icons/puppeteer.svg new file mode 100644 index 000000000..3d00a5cfd --- /dev/null +++ b/icons/puppeteer.svg @@ -0,0 +1 @@ + diff --git a/src/icons/fileIcons.ts b/src/icons/fileIcons.ts index 119892d44..cc58c8684 100644 --- a/src/icons/fileIcons.ts +++ b/src/icons/fileIcons.ts @@ -2464,5 +2464,17 @@ export const fileIcons: FileIcons = { fileExtensions: ['abap', 'acds', 'asddls'], }, { name: 'lottie', fileExtensions: ['lottie'] }, + { + name: 'puppeteer', + fileNames: [ + '.puppeteerrc.cjs,', + '.puppeteerrc.js,', + '.puppeteerrc', + '.puppeteerrc.json,', + '.puppeteerrc.yaml,', + 'puppeteer.config.js', + 'puppeteer.config.cjs', + ], + }, ], }; From 6a42e97ab0a01e3d905eca20ef369ecf4350db54 Mon Sep 17 00:00:00 2001 From: Philipp Kief Date: Sat, 11 Nov 2023 16:27:18 +0100 Subject: [PATCH 2/3] Update file icon --- icons/puppeteer.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/icons/puppeteer.svg b/icons/puppeteer.svg index 3d00a5cfd..3ba12ab9a 100644 --- a/icons/puppeteer.svg +++ b/icons/puppeteer.svg @@ -1 +1 @@ - + From 36f3966c7520e33af9cf715136b12fd19e9e9980 Mon Sep 17 00:00:00 2001 From: Philipp Kief Date: Thu, 16 Nov 2023 22:31:41 +0100 Subject: [PATCH 3/3] Update workflow files --- .github/workflows/build.yml | 7 +++- .github/workflows/color-check.yml | 3 +- .github/workflows/icon-review.yml | 53 +++++++++++++++++++++++++++++++ .github/workflows/pr-closed.yml | 26 +++++++++++++++ .github/workflows/release.yml | 12 ++++++- 5 files changed, 98 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/icon-review.yml create mode 100644 .github/workflows/pr-closed.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 85d57d2ac..c1114e219 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,17 +14,21 @@ jobs: steps: - name: Checkout 🛎 - uses: actions/checkout@v3 + uses: actions/checkout@v4 + - name: Setup Node.js ${{ matrix.node-version }} ⚙ uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} + - name: Run display server 🖥 run: /usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & echo "Started xvfb" shell: bash if: ${{ success() && matrix.os == 'ubuntu-latest' }} + - name: Install node_modules 📦 run: npm ci + - name: Cache node_modules 💾 uses: actions/cache@v3 env: @@ -37,6 +41,7 @@ jobs: ${{ runner.os }}-build-${{ env.cache-name }}- ${{ runner.os }}-build- ${{ runner.os }}- + - name: Test + Build 🚀 run: | npm test diff --git a/.github/workflows/color-check.yml b/.github/workflows/color-check.yml index 27e4d9db7..5c33bb7c2 100644 --- a/.github/workflows/color-check.yml +++ b/.github/workflows/color-check.yml @@ -13,9 +13,10 @@ jobs: TARGET_BRANCH: ${{ github.event.pull_request.base.ref }} steps: - name: Checkout 🛎️ - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 + - name: Check colors 🎨 run: | svgFiles=$(git diff origin/${{ env.TARGET_BRANCH }} --diff-filter=ACMRTUX --name-only | grep '.svg$') diff --git a/.github/workflows/icon-review.yml b/.github/workflows/icon-review.yml new file mode 100644 index 000000000..3afc76d1d --- /dev/null +++ b/.github/workflows/icon-review.yml @@ -0,0 +1,53 @@ +name: Icon Review + +on: + pull_request: + paths: + - 'icons/*.svg' + +jobs: + icon-review: + name: Icon Review + runs-on: ubuntu-latest + env: + TARGET_BRANCH: ${{ github.event.pull_request.base.ref }} + steps: + - name: Checkout 🛎️ + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Review SVG files 🔍 + run: | + svgFiles=$(git diff origin/${{ env.TARGET_BRANCH }} --diff-filter=ACMRTUX --name-only | grep '.svg$') + echo "SVG files changed: ${svgFiles}" + npx svg-icon-review ${svgFiles} + + - name: Install jq ⚙️ + run: sudo apt-get install jq + + - name: Upload PNG ⬆️ + env: + IMAGE_UPLOAD: ${{ secrets.IMAGE_UPLOAD }} + id: upload + run: | + IMAGE_URL=$(curl --location 'https://freeimage.host/json' --form 'source=@"./preview.png"' --form 'type="file"' --form 'action="upload"' --form 'auth_token="${{env.IMAGE_UPLOAD}}"' | jq -r '.image.url') + echo image_url=$IMAGE_URL >> $GITHUB_ENV + shell: bash + + - name: Post review in PR ✍️ + uses: actions/github-script@v7 + with: + script: | + const image_url = "${{ env.image_url }}"; + console.log('URL: '+image_url); + const commentBody = '## Preview \n\nThank you for creating a pull request. This preview shows you how your changes will look on the different themes: \n\n ![Generated Preview](' + image_url + ') \n\n You can find more information how to contribute in the [contribution guidelines](https://github.com/PKief/vscode-material-icon-theme/blob/main/CONTRIBUTING.md).'; + + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: commentBody + }) + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/pr-closed.yml b/.github/workflows/pr-closed.yml new file mode 100644 index 000000000..7fa524fa7 --- /dev/null +++ b/.github/workflows/pr-closed.yml @@ -0,0 +1,26 @@ +name: PR closed + +on: + pull_request: + types: + - closed + +jobs: + thank_you: + runs-on: ubuntu-latest + if: github.event.pull_request.merged == true + steps: + - name: Post Thank You Comment 🙏 + uses: actions/github-script@v7 + with: + script: | + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: `## Merge Successful + + Thanks for your contribution! 🎉 + + The changes will be part of the upcoming update on the marketplace.` + }) \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d54b48348..da69e3af1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,24 +19,28 @@ jobs: VERSION_CHANGE: ${{ github.event.inputs.versionChange }} steps: - name: Checkout 🛎️ - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 + - name: Setup Node.js ⚙️ uses: actions/setup-node@v3 with: node-version: 'lts/*' registry-url: 'https://registry.npmjs.org' + - name: Install node_modules 📦 run: | npm ci npm install --global @vscode/vsce + - name: Update version ↗ run: | git config --global user.name 'Philipp Kief' git config --global user.email 'PKief@users.noreply.github.com' git config --global push.followTags true npm version ${{ env.VERSION_CHANGE }} -m "Release %s" + - name: Get meta data 🔍 run: | NODE_VERSION=$(node -p -e "require('./package.json').version") @@ -45,10 +49,13 @@ jobs: echo NAME=$NODE_NAME >> $GITHUB_ENV NODE_DISPLAY_NAME=$(node -p -e "require('./package.json').displayName") echo DISPLAY_NAME=$NODE_DISPLAY_NAME >> $GITHUB_ENV + - name: Build ⚒️ run: vsce package + - name: Push tags 📌 run: git push + - name: Release ${{ env.VERSION }} 🔆 uses: softprops/action-gh-release@v1 with: @@ -56,17 +63,20 @@ jobs: tag_name: v${{ env.VERSION }} name: ${{ env.DISPLAY_NAME }} v${{ env.VERSION }} generate_release_notes: true + - name: Publish to Open VSX Registry 🌐 uses: HaaLeo/publish-vscode-extension@v1 with: pat: ${{ secrets.OPEN_VSX_TOKEN }} extensionFile: ${{ env.NAME }}-${{ env.VERSION }}.vsix + - name: Publish to Visual Studio Marketplace 🌐 uses: HaaLeo/publish-vscode-extension@v1 with: pat: ${{ secrets.VS_MARKETPLACE_TOKEN }} registryUrl: https://marketplace.visualstudio.com extensionFile: ${{ env.NAME }}-${{ env.VERSION }}.vsix + - name: Publish to NPM Registry 🌐 run: npm publish env: