Merge branch 'linux' #12
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 MAC | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
strategy: | |
matrix: | |
include: | |
- os: macos-latest | |
platform: darwin | |
arch: x64 | |
npm_config_arch: x64 | |
branch: mac_win | |
- os: macos-latest | |
platform: darwin | |
arch: arm64 | |
npm_config_arch: arm64 | |
branch: mac_win | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: ${{ matrix.branch }} # Use the dynamically set branch | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 16.x | |
- run: | | |
python3 -m pip install setuptools | |
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 }} | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: ${{ env.target }} | |
path: "*.vsix" | |
publish: | |
runs-on: ubuntu-latest | |
needs: build | |
if: success() | |
steps: | |
- uses: actions/download-artifact@v2 | |
- run: npx vsce publish --packagePath $(find . -iname *.vsix) | |
env: | |
VSCE_PAT: ${{ secrets.VSCE_TOKEN }} |