Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Codicon automation #229

Merged
merged 6 commits into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 48 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: Codicons Build
on:
push:
branches: [ main ]
tags:
- '*'
pull_request:
branches: [ main ]
workflow_dispatch:
Expand All @@ -12,8 +14,8 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '16'

Expand All @@ -22,3 +24,47 @@ jobs:

- name: Build font
run: npm run build

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: codicon-font-${{ github.sha }}
path: dist/codicon.ttf

- name: Pull Request to microsoft/vscode
run: |
git config user.email "[email protected]"
git config user.name "GitHub Actions at microsoft/vscode-codicons"
git clone https://github.com/microsoft/vscode.git
cd vscode
git checkout -b update-codicons
cp ../dist/codicon.ttf src/vs/base/browser/ui/codicons/codicon/
# TODO: Generate mapping file

git add .
git commit --no-verify -m "Update codicons to ${{ github.ref }}"
git push -f origin update-codicons
# TODO: Create PR

publish:
runs-on: ubuntu-latest

steps:
- name: Write release notes
if: startsWith(github.ref, 'refs/tags/')
run: |
commits=$(git log --pretty=format:"- %h: %s%n (%H)%n" ${{ github.event.before }}..${{ github.sha }})
echo "This release includes: ${commits}" > release_notes.txt

# Create a release when a new tag is pushed. Writes out all new commit messages since the last release.
- name: Create Release
if: startsWith(github.ref, 'refs/tags/')
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
body: $(cat release_notes.txt)
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -54,7 +54,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -68,4 +68,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v3
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Generated font and icon gallery
dist/

## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ npm install
npm run build
```

Output will be exported to a `dist` folder. We track this folder so that we can see the updated changes to the unicode characters.
Output will be exported to a `dist` folder.

## Update packages

Expand Down
Loading