Skip to content

Update publish.yml

Update publish.yml #11

Workflow file for this run

name: Publish
on:
workflow_call:
secrets:
VSCE_PAT:
required: false
GITHUB_TOKEN:

Check failure on line 7 in .github/workflows/publish.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/publish.yml

Invalid workflow file

secret name `GITHUB_TOKEN` within `workflow_call` can not be used since it would collide with system reserved name
required: false
push:
tags:
- "*"
jobs:
build:
strategy:
matrix:
include:
- os: windows-latest
platform: win32
arch: x64
npm_config_arch: x64
# - os: windows-latest
# platform: win32
# arch: ia32
# npm_config_arch: ia32
- os: windows-latest
platform: win32
arch: arm64
npm_config_arch: arm
- os: ubuntu-latest
platform: linux
arch: x64
npm_config_arch: x64
# - os: ubuntu-latest
# platform: linux
# arch: arm64
# npm_config_arch: arm64
# - os: ubuntu-latest
# platform: linux
# arch: armhf
# npm_config_arch: arm
# - os: ubuntu-latest
# platform: alpine
# arch: x64
# npm_config_arch: x64
- os: macos-latest
platform: darwin
arch: x64
npm_config_arch: x64
- os: macos-latest
platform: darwin
arch: arm64
npm_config_arch: arm64
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
- 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 }}
- uses: actions/upload-artifact@v3
with:
name: ${{ env.target }}
path: "*.vsix"
# 成果物をダウンロードしてpublish
publish:
runs-on: ubuntu-latest
needs: build
if: success()
steps:
- uses: actions/download-artifact@v3
- run: npx vsce publish --packagePath $(find . -iname *.vsix)
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}