codemp-vscode/.github/workflows/publish.yml

52 lines
1.3 KiB
YAML
Raw Normal View History

2024-09-14 18:03:26 +02:00
name: publish
on:
push:
branches:
- dev
- stable
jobs:
build:
strategy:
matrix:
include:
- os: ubuntu-latest
platform: linux
arch: x64
npm_config_arch: x64
- os: windows-latest
platform: win32
arch: x64
npm_config_arch: x64
- os: macos-latest
platform: darwin
arch: arm64
npm_config_arch: arm64
runs-on: ${{ matrix.os }}
steps:
2024-09-14 18:14:36 +02:00
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
2024-09-14 18:03:26 +02:00
with:
2024-09-14 18:17:55 +02:00
node-version: '20'
2024-09-14 18:03:26 +02:00
- run: npm install
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
npm_config_arch: ${{ matrix.npm_config_arch }}
- shell: pwsh
run: echo "target=${{ matrix.platform }}-${{ matrix.arch }}" >> $env:GITHUB_ENV
- run: npx vsce package --target ${{ env.target }}
2024-09-14 18:14:36 +02:00
- uses: actions/upload-artifact@v4
2024-09-14 18:03:26 +02:00
with:
name: ${{ env.target }}
path: "*.vsix"
publish:
runs-on: ubuntu-latest
needs: build
steps:
2024-09-14 18:14:36 +02:00
- uses: actions/download-artifact@v4
2024-09-14 18:03:26 +02:00
- run: npx vsce publish --packagePath $(find . -iname *.vsix)
env:
VSCE_PAT: ${{ secrets.AZURE_TOKEN }}