Skip to content

Commit

Permalink
Deliver binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
yyoncho committed Feb 13, 2023
1 parent 4025b96 commit 44e0567
Showing 1 changed file with 100 additions and 0 deletions.
100 changes: 100 additions & 0 deletions .github/workflows/binaries.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
on:
push:
paths-ignore: ['media/**', 'docs/**', '**/*.md']
branches:
- master
pull_request:
paths-ignore: ['media/**', 'docs/**', '**/*.md']
workflow_dispatch:

jobs:
build:
strategy:
fail-fast: false
matrix:
target:
- os: linux
cpu: amd64
- os: linux
cpu: arm64
- os: macos
cpu: amd64
- os: macos
cpu: arm64
- os: windows
cpu: amd64
include:
- target:
os: linux
builder: ubuntu-22.04
shell: bash
- target:
os: macos
builder: macos-11
shell: bash
- target:
os: windows
builder: windows-2019
shell: bash
defaults:
run:
shell: ${{ matrix.shell }}

name: '${{ matrix.target.os }}-${{ matrix.target.cpu }}'
runs-on: ${{ matrix.builder }}
steps:
- name: Checkout
uses: actions/checkout@v3

- uses: jiro4989/setup-nim-action@v1.4.3
with:
nimversion: ${{ matrix.nimversion }}
yes: true

- name: Install nimble
run: |
git clone https://github.com/yyoncho/nimble -b nim-as-dep
cd nimble
nimble -y build -d:release
- name: test
run: |
./nimble/nimble install
- name: Compress the Nim Language Server binaries
if: matrix.target.os != 'windows'
run: tar -c -z -v -f nimlangserver-${{ matrix.target.os }}-${{ matrix.target.cpu }}.tar.gz nimlangserver

- name: Compress the Nim Language Server binaries
if: matrix.target.os == 'windows'
run: tar -c -z -v -f nimlangserver-${{ matrix.target.os }}-${{ matrix.target.cpu }}.tar.gz nimlangserver.exe

- name: Upload the Nim Language Server Binaries
uses: actions/upload-artifact@v2
with:
name: nimlangserver-${{ matrix.target.os }}-${{ matrix.target.cpu }}.tar.gz
path: nimlangserver-${{ matrix.target.os }}-${{ matrix.target.cpu }}.tar.gz

create-github-release:
name: Create Github Release
needs: [build]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download artefacts
uses: actions/download-artifact@v2

- uses: ncipollo/release-action@v1
with:
name: Latest Langserver Binaries
artifacts: "*/*"
allowUpdates: true
makeLatest: true
prerelease: true
tag: latest

- name: Delete artefacts
uses: geekyeggo/delete-artifact@v1
with:
failOnError: false
name: "nimlangserver-*"

0 comments on commit 44e0567

Please # to comment.