-
Notifications
You must be signed in to change notification settings - Fork 182
64 lines (51 loc) · 1.67 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Codicons Build
on:
push:
branches: [ main ]
tags:
- '*' # Only runs on annotated tags
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '16'
- name: Install dependencies
run: npm install
- name: Build font
run: npm run build
- name: Upload codicon.ttf as artifact
uses: actions/upload-artifact@v4
with:
name: codicon-font-${{ github.sha }}.ttf
path: dist/codicon.ttf
- name: PR to microsoft/vscode # TODO: Separate "deploy:" step?
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
BRANCH="update-codicons"
MESSAGE="chore: Update codicons to ${{ github.sha }}"
git clone --depth=1 https://github.com/microsoft/vscode.git
cd vscode
git checkout -b $BRANCH
cp ../dist/codicon.ttf src/vs/base/browser/ui/codicons/codicon/
cp ../dist/codiconsLibrary.ts src/vs/base/common/
git add .
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com"
git commit -m "$MESSAGE"
# TODO: This doesn't work yet due to permissions
#
# git push -f origin $BRANCH
# echo "${{ secrets.ACCESS_TOKEN }}" > token.txt
# gh auth login --with-token < token.txt
# gh pr create \
# --title "$MESSAGE" \
# --body "" \
# --base "main" \
# --head "$BRANCH"