Skip to content

Commit

Permalink
feat(ci): static releases
Browse files Browse the repository at this point in the history
  • Loading branch information
GeopJr committed Nov 6, 2022
1 parent fdac3e2 commit 2893355
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 19 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Release
on: workflow_dispatch
jobs:
build_linux_static:
runs-on: ubuntu-latest
container:
image: crystallang/crystal:latest-alpine
steps:
- name: Download source
uses: actions/checkout@v2
- name: Retrieve version
run: |
echo "::set-output name=VERSION::$(shards version)"
id: version
- name: Build
run: shards build --production --no-debug --release --static
- name: Make binary executable
run: chmod +x bin/crycord
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: crycord-${{ steps.version.outputs.VERSION }}-linux-x86_64-static
path: bin/crycord

release:
runs-on: ubuntu-latest
needs: build_linux_static
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
with:
path: ./GH_ARTIFACTS
- name: Make all binaries executable
run: chmod +x GH_ARTIFACTS/**/*
- name: Create zips
run: cd GH_ARTIFACTS && find . -maxdepth 1 -mindepth 1 -type d -execdir zip -jr '{}.zip' '{}' \; && cd ..
- uses: softprops/action-gh-release@v1
with:
draft: true
files: |
GH_ARTIFACTS/*.zip
17 changes: 0 additions & 17 deletions .github/workflows/spec.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Uses [asar-cr](https://github.com/GeopJr/asar-cr).

## Installation

You can download the *statically* linked build from the releases page!
You can download the *statically* linked build from the [releases page](https://github.com/GeopJr/Crycord/releases/latest)!

## Building

Expand Down
2 changes: 1 addition & 1 deletion shard.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: crycord
version: 1.3.2
version: 1.4.0

authors:
- GeopJr <[email protected]>
Expand Down

0 comments on commit 2893355

Please sign in to comment.