mirror of https://github.com/jackwener/wx-cli.git
fix: add permissions:write, fix Windows copy to use PowerShell syntax
parent
a2239c0dca
commit
3eddfa0ffa
|
|
@ -5,6 +5,9 @@ on:
|
||||||
tags: ['v*']
|
tags: ['v*']
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check:
|
check:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
@ -88,10 +91,11 @@ jobs:
|
||||||
|
|
||||||
- name: Copy binary (Windows)
|
- name: Copy binary (Windows)
|
||||||
if: matrix.os == 'windows-latest'
|
if: matrix.os == 'windows-latest'
|
||||||
|
shell: pwsh
|
||||||
run: |
|
run: |
|
||||||
copy target\${{ matrix.target }}\release\wx.exe ${{ matrix.asset }}
|
Copy-Item "target\${{ matrix.target }}\release\wx.exe" "${{ matrix.asset }}"
|
||||||
if not exist npm\platforms\${{ matrix.npm_dir }}\bin mkdir npm\platforms\${{ matrix.npm_dir }}\bin
|
New-Item -ItemType Directory -Force -Path "npm\platforms\${{ matrix.npm_dir }}\bin" | Out-Null
|
||||||
copy target\${{ matrix.target }}\release\wx.exe npm\platforms\${{ matrix.npm_dir }}\bin\wx.exe
|
Copy-Item "target\${{ matrix.target }}\release\wx.exe" "npm\platforms\${{ matrix.npm_dir }}\bin\wx.exe"
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
|
@ -108,8 +112,6 @@ jobs:
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
with:
|
with:
|
||||||
files: ${{ matrix.asset }}
|
files: ${{ matrix.asset }}
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
publish-npm:
|
publish-npm:
|
||||||
needs: build
|
needs: build
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue