Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 48 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ permissions:

on:
push:
tags:
- v[0-9]+.*
branches:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only running the release flow when a tag is pushed that matches a semver version is intentional, this change should be reverted.

- "*"

jobs:
create-release:
Expand All @@ -24,28 +24,59 @@ jobs:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
# - target: aarch64-unknown-linux-gnu
# os: ubuntu-latest
- target: x86_64-apple-darwin
os: macos-latest
- target: aarch64-apple-darwin
os: macos-latest
# - target: x86_64-pc-windows-msvc
# os: windows-latest
- target: x86_64-pc-windows-msvc
os: windows-latest

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4

# Install dependencies on Linux
- name: Install dependencies on Linux
if: startsWith(matrix.target, 'x86_64-unknown-linux') || startsWith(matrix.target, 'aarch64-unknown-linux')
run: sudo apt-get update && sudo apt-get install -y make openssl libssl-dev
# Install deps (Linux)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we can get binary releases working on Windows that would be wonderful! I'm pretty wary of these changes however. I'll need to see a passing run of this updated workflow on your fork of asm-lsp before this will be ok to merge.

- name: Install dependencies (Linux)
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y make openssl libssl-dev pkg-config

# Install Rust target
- name: Install Rust target
run: rustup target add ${{ matrix.target }}

# Build REAL LSP binary
- name: Build asm-lsp (LSP server)
run: cargo build --release --bin asm-lsp --target ${{ matrix.target }}

# Package binary
- name: Package binary (unix)
if: runner.os != 'Windows'
run: |
mkdir dist
cp target/${{ matrix.target }}/release/asm-lsp dist/
tar -czf asm-lsp-${{ matrix.target }}.tar.gz -C dist asm-lsp

# Upload Rust binaries
- uses: taiki-e/upload-rust-binary-action@v1
- name: Package binary (windows)
if: runner.os == 'Windows'
run: |
mkdir dist
copy target\${{ matrix.target }}\release\asm-lsp.exe dist\
powershell Compress-Archive dist\asm-lsp.exe asm-lsp-${{ matrix.target }}.zip

# Upload to release
- name: Upload (unix)
if: runner.os != 'Windows'
uses: softprops/action-gh-release@v1
with:
bin: asm-lsp
target: ${{ matrix.target }}
tar: unix
# zip: windows
token: ${{ secrets.GITHUB_TOKEN }}
files: asm-lsp-${{ matrix.target }}.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload (windows)
if: runner.os == 'Windows'
uses: softprops/action-gh-release@v1
with:
files: asm-lsp-${{ matrix.target }}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ tweak your code for optimisation.
Install using the cargo package manager, either from `crates.io` or from github:

```bash
cargo install asm-lsp
cargo install asm-lsp --locked
# or to get the latest version from github
cargo install --git https://github.com/bergercookie/asm-lsp asm-lsp
cargo install --git https://github.com/bergercookie/asm-lsp asm-lsp --locked
```

Install using the cargo from source:

```bash
cargo install --path asm-lsp
cargo install --path asm-lsp --locked
```

### Precompiled Binaries
Expand Down