Skip to content

Commit

Permalink
Merge pull request #12 from koliyo/feature/cross-platform-release
Browse files Browse the repository at this point in the history
Cross platform release artifacts
  • Loading branch information
koliyo authored Oct 7, 2023
2 parents 3db51b4 + 9bed39d commit 563b53d
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 8 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/build-and-test-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,20 @@ jobs:
restore-keys: |
${{ runner.os }}-spm-
- run: mkdir -p /home/runner/work/hylo-lsp/hylo-lsp/artifacts
- name: Create artifact directory
run: mkdir -p /home/runner/work/hylo-lsp/hylo-lsp/artifacts

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and Test
uses: devcontainers/[email protected]
with:
imageName: ghcr.io/koliyo/hylo-lsp-devcontainer:latest
runCmd: |
set -eo pipefail
cd hylo
Expand Down
34 changes: 27 additions & 7 deletions .github/workflows/publish-release-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,41 @@ jobs:
uses: actions/download-artifact@v3
with:
name: hylo-lsp-artifacts-mac
path: hylo-lsp-mac
path: hylo-lsp-mac-arm64

- name: Download hylo-lsp-artifacts-linux
uses: actions/download-artifact@v3
with:
name: hylo-lsp-artifacts-linux
path: hylo-lsp-linux-x64

- name: Download hylo-lsp-artifacts-windows
uses: actions/download-artifact@v3
with:
name: hylo-lsp-artifacts-windows
path: hylo-lsp-windows-x64

- name: Package Hylo release artifacts
run: |
set -eo pipefail
cp -Rp hylo/Library/Hylo hylo-stdlib
ls -l hylo-lsp-mac/
chmod +x hylo-lsp-mac/*
tar -zcvf hylo-stdlib.tar.gz hylo-stdlib
tar -zcvf hylo-lsp-mac.tar.gz hylo-lsp-mac
mkdir -p release-artifacts
tar -zcvf release-artifacts/hylo-stdlib.tar.gz hylo-stdlib
# Repackage with just the server binaries, for minimal size, and zip for easy unpacking in node.js
chmod +x hylo-lsp-mac-arm64/*
chmod +x hylo-lsp-linux-x64/*
chmod +x hylo-lsp-windows-x64/*
zip release-artifacts/hylo-lsp-server-mac.zip hylo-lsp-mac-arm64/hylo-lsp-server
zip release-artifacts/hylo-lsp-client-mac.zip hylo-lsp-mac-arm64/hylo-lsp-client
zip release-artifacts/hylo-lsp-server-linux.zip hylo-lsp-linux-x64/hylo-lsp-server
zip release-artifacts/hylo-lsp-client-linux.zip hylo-lsp-linux-x64/hylo-lsp-client
zip release-artifacts/hylo-lsp-server-windows.zip hylo-lsp-windows-x64/hylo-lsp-server.exe
zip release-artifacts/hylo-lsp-client-windows.zip hylo-lsp-windows-x64/hylo-lsp-client.exe
ls -l release-artifacts
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
LICENSE
hylo-lsp-mac.tar.gz
hylo-stdlib.tar.gz
release-artifacts/*

0 comments on commit 563b53d

Please sign in to comment.