v0.2.2 #2
Workflow file for this run
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: Release | |
on: | |
release: | |
types: | |
- created | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- vscode-platform: win32-x64 | |
rust-target: x86_64-pc-windows-gnu | |
github-os: ubuntu-22.04 | |
ext: ".exe" | |
install-script: sudo apt-get install -y mingw-w64 | |
- vscode-platform: linux-x64 | |
rust-target: x86_64-unknown-linux-musl | |
github-os: ubuntu-22.04 | |
ext: "" | |
install-script: "" | |
- vscode-platform: darwin-x64 | |
rust-target: x86_64-apple-darwin | |
github-os: macos-13 | |
ext: "" | |
install-script: "" | |
- vscode-platform: darwin-arm64 | |
rust-target: aarch64-apple-darwin | |
github-os: macos-14 | |
ext: "" | |
install-script: "" | |
runs-on: ${{ matrix.github-os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- run: ${{ matrix.install-script }} | |
- run: rustup target add ${{ matrix.rust-target }} | |
- run: cargo build --release --target ${{ matrix.rust-target }} | |
- uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: target/${{ matrix.rust-target }}/release/adroit${{ matrix.ext }} | |
asset_name: adroit-${{ matrix.rust-target }}${{ matrix.ext }} | |
asset_content_type: application/octet-stream | |
- run: npm ci | |
- run: mkdir packages/adroit-vscode/bin | |
- run: cp target/${{ matrix.rust-target }}/release/adroit${{ matrix.ext }} packages/adroit-vscode/bin/adroit${{ matrix.ext }} | |
- run: npm run --workspace=adroit-vscode build -- --target ${{ matrix.vscode-platform }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: adroit-vscode-${{ matrix.vscode-platform }} | |
path: packages/adroit-vscode/adroit-vscode-*.vsix | |
vscode: | |
needs: build | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: adroit-vscode-win32-x64 | |
path: vsix | |
- uses: actions/download-artifact@v4 | |
with: | |
name: adroit-vscode-linux-x64 | |
path: vsix | |
- uses: actions/download-artifact@v4 | |
with: | |
name: adroit-vscode-darwin-x64 | |
path: vsix | |
- uses: actions/download-artifact@v4 | |
with: | |
name: adroit-vscode-darwin-arm64 | |
path: vsix | |
- run: npm ci | |
- run: npx vsce publish --packagePath vsix/* | |
env: | |
VSCE_PAT: ${{ secrets.VSCE_PAT }} |