-
-
Notifications
You must be signed in to change notification settings - Fork 641
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
143 additions
and
12 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
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,63 @@ | ||
name: Icon Review | ||
|
||
on: | ||
pull_request_target: | ||
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 Fork 🛎️ | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
repository: ${{ github.event.pull_request.head.repo.full_name }} | ||
fetch-depth: 0 | ||
path: fork | ||
|
||
- name: Checkout Original 🛎️ | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
path: main | ||
|
||
- name: Review SVG files 🔍 | ||
run: | | ||
cd main | ||
svgFiles=$(git diff --no-index ../main ../fork --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=@"./main/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 }} |
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,26 @@ | ||
name: PR closed | ||
|
||
on: | ||
pull_request_target: | ||
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.` | ||
}) |
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 |
---|---|---|
|
@@ -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 '[email protected]' | ||
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,28 +49,34 @@ 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: | ||
files: ${{ env.NAME }}-${{ env.VERSION }}.vsix | ||
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: | ||
|
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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