CI #149
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-2022 | |
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-13 | |
platform: darwin | |
arch: x64 | |
- os: macos-13 | |
platform: darwin | |
arch: arm64 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- shell: pwsh | |
run: echo "target=${{ matrix.platform }}-${{ matrix.arch }}" >> $env:GITHUB_ENV | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
architecture: ${{ matrix.arch }} | |
cache: 'npm' | |
- run: echo '${{ secrets.CONFIG_JSON }}' > ${{ github.workspace }}/src/config.json | |
- 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 && npm config set msvs-version 2022 --global && npm install --global cmake-js node-gyp && echo CMAKE_JS_LIB - $CMAKE_JS_LIB | |
- name: mac-specific | |
shell: zsh | |
if: matrix.platform =='macos' | |
run: brew install openssl@3 | |
- name: general | |
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 }} |