-
Notifications
You must be signed in to change notification settings - Fork 211
101 lines (99 loc) · 3.13 KB
/
publish-extensions.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: Publish extensions to open-vsx.org
on:
schedule:
# Run at 03:03 UTC every day.
- cron: "3 3 * * 1-5"
workflow_dispatch:
inputs:
extensions:
description: "Comma separated list of extensions to publish"
required: false
default: ""
skipPublish:
description: "Skip publishing to Open VSX, only build extensions"
type: boolean
required: false
default: false
forcefullyPublish:
description: "Force publish to Open VSX, even if version is already published"
type: boolean
required: false
default: false
jobs:
publish_extensions:
env:
EXTENSIONS: ${{ github.event.inputs.extensions }}
SKIP_PUBLISH: ${{ github.event.inputs.skipPublish }}
FORCE: ${{ github.event.inputs.forcefullyPublish }}
name: Publish Extensions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4.0.4
with:
node-version: "18.x"
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Set up pyenv
uses: "gabrielfalcao/pyenv-action@2f49ca7587f9d0663d13f1147b78d3361417eaf7"
with:
command: python --version
- name: Set default global version
run: |
pyenv install 3.8
pyenv global 3.8
- uses: actions/setup-java@v4
with:
distribution: "microsoft"
java-version: "17"
- name: Install dependencies for native modules
run: |
sudo apt-get update
sudo apt-get install libpango1.0-dev libgif-dev
- run: npm install
- run: npm i -g @vscode/vsce
- run: node publish-extensions
env:
OVSX_PAT: ${{ secrets.OVSX_PAT }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Report results
run: bun run ./report-extensions.ts
- uses: actions/upload-artifact@v4
if: always()
with:
name: report
path: |
/tmp/stat.json
/tmp/result.md
- uses: actions/upload-artifact@v4
if: always()
with:
name: artifacts
path: |
/tmp/artifacts/*.vsix
- name: Upload job summary
if: always()
run: cat /tmp/result.md >> $GITHUB_STEP_SUMMARY
- name: Get previous job's status
id: lastrun
uses: filiptronicek/get-last-job-status@main
- name: Slack Notification
if: ${{ !github.event.inputs.extensions && ((success() && steps.lastrun.outputs.status == 'failed') || failure()) }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.GITPOD_SLACK_WEBHOOK }}
SLACK_COLOR: ${{ job.status }}
check_parity:
name: Check MS parity
runs-on: ubuntu-latest
needs: publish_extensions
if: ${{ !github.event.inputs.extensions }} # only run on full runs
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4.0.4
with:
node-version: "18.x"
- run: npm install
- name: Check parity of the top 4096 extensions
run: node lib/reportStat.js