Skip to content

Publish extensions to open-vsx.org #1411

Publish extensions to open-vsx.org

Publish extensions to open-vsx.org #1411

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@v3
- uses: actions/[email protected]
with:
node-version: "14.x"
- uses: actions/setup-python@v4
with:
python-version: "3.7"
- uses: actions/setup-java@v3
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 }}
- run: node report-extensions
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@v3
if: always()
with:
name: report
path: |
/tmp/stat.json
/tmp/meta.json
/tmp/result.md
- uses: actions/upload-artifact@v3
if: always()
with:
name: artifacts
path: |
/tmp/artifacts/*.vsix
- name: Upload job summary
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@v3
- uses: actions/[email protected]
with:
node-version: "14.x"
- run: npm install
- name: Check parity of the top 4096 extensions
run: node lib/reportStat.js