Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
tekumara committed Sep 22, 2023
1 parent 1426919 commit 012d7c1
Showing 1 changed file with 21 additions and 13 deletions.
34 changes: 21 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,18 +73,26 @@ jobs:
run: sudo apt-get install gcc-arm-linux-gnueabihf
- run: cargo build --target ${{ matrix.target }} --release
- run: npm ci
- name: vsce package (unix)
- name: vsce package
# use bash on windows
shell: bash
if: matrix.os != 'windows-latest'
run: |
ref=${GITHUB_REF:-snapshot}
ver=${ref/refs\/tags\//}
archive="typos-lsp-$ver-${{ matrix.target }}"
mkdir -p bundled dist
cp target/${{ matrix.target }}/release/typos-lsp bundled/
cp target/${{ matrix.target }}/release/typos-lsp* bundled/
npx vsce package -o dist/ --target ${{ matrix.code-target }}
- name: vsce package (windows)
if: matrix.os == 'windows-latest'
run: |
mkdir bundled,dist
copy target\${{ matrix.target }}\release\typos-lsp.exe bundled\
npx vsce package -o dist\ --target ${{ matrix.code-target }}
if [ "${{ matrix.os }}" = "windows-latest" ]; then
7a "dist/${archive}.zip" bundled/*
else
tar czf "dist/${archive}.tar.gz" -C bundled .
fi
ls -al dist/*
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
Expand All @@ -111,10 +119,10 @@ jobs:
run: npx vsce publish --packagePath $(npx glob dist/**/*.vsix)
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
- name: Upload to GH release
uses: softprops/action-gh-release@v1
with:
files: dist/**/*.vsix
# - name: Upload to GH release
# uses: softprops/action-gh-release@v1
# with:
# files: dist/**/*.vsix
- name: Setup tmate session
if: ${{ failure() }}
#if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3

0 comments on commit 012d7c1

Please sign in to comment.