diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f61484d..f615008 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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: @@ -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