CI #121
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
# branches: | |
# - "**" | |
tags: | |
- "v*.*.*" | |
workflow_dispatch: | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: windows-latest | |
platform: win32 | |
arch: x64 | |
#- os: windows-latest | |
# platform: win32 | |
# arch: ia32 | |
#- os: windows-latest | |
# platform: win32 | |
# arch: arm64 | |
- os: ubuntu-latest | |
platform: linux | |
arch: x64 | |
# - os: ubuntu-latest | |
# platform: linux | |
# arch: arm64 | |
# - os: ubuntu-latest | |
# platform: linux | |
# arch: armhf | |
# - os: ubuntu-latest | |
# platform: alpine | |
# arch: x64 | |
# - os: macos-latest | |
# platform: darwin | |
# arch: x64 | |
# - os: macos-latest | |
# platform: darwin | |
# arch: arm64 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- shell: pwsh | |
run: echo "target=${{ matrix.platform }}-${{ matrix.arch }}" >> $env:GITHUB_ENV | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
architecture: ${{ matrix.arch }} | |
cache: 'npm' | |
- uses: ilammy/setup-nasm@v1 | |
- name: windows-specific | |
shell: pwsh | |
if: matrix.platform == 'win32' | |
run: choco install openssl.light --version=1.1.1 && choco install cmake && npm config set msvs_version 2022 --global && npm install --global cmake-js node-gyp && echo CMAKE_JS_LIB - $CMAKE_JS_LIB && npm ci && npm run rebuild | |
- name: general | |
if: matrix.platform != 'win32' | |
run: npm ci && npm run rebuild | |
- run: npx vsce package --target ${{ env.target }} | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.target }} | |
path: "*.vsix" | |
# publish: | |
# runs-on: ubuntu-latest | |
# needs: build | |
# if: success() && startsWith( github.ref, 'refs/tags/') | |
# steps: | |
# - uses: actions/download-artifact@v2 | |
# - run: npx vsce publish --packagePath $(find . -iname *.vsix) | |
# env: | |
# VSCE_PAT: ${{ secrets.VSCE_PAT }} |