Skip to content

Commit 2893355

Browse files
committed
feat(ci): static releases
1 parent fdac3e2 commit 2893355

File tree

4 files changed

+43
-19
lines changed

4 files changed

+43
-19
lines changed

.github/workflows/release.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Release
2+
on: workflow_dispatch
3+
jobs:
4+
build_linux_static:
5+
runs-on: ubuntu-latest
6+
container:
7+
image: crystallang/crystal:latest-alpine
8+
steps:
9+
- name: Download source
10+
uses: actions/checkout@v2
11+
- name: Retrieve version
12+
run: |
13+
echo "::set-output name=VERSION::$(shards version)"
14+
id: version
15+
- name: Build
16+
run: shards build --production --no-debug --release --static
17+
- name: Make binary executable
18+
run: chmod +x bin/crycord
19+
- name: Upload artifact
20+
uses: actions/upload-artifact@v3
21+
with:
22+
name: crycord-${{ steps.version.outputs.VERSION }}-linux-x86_64-static
23+
path: bin/crycord
24+
25+
release:
26+
runs-on: ubuntu-latest
27+
needs: build_linux_static
28+
steps:
29+
- uses: actions/checkout@v2
30+
- uses: actions/download-artifact@v2
31+
with:
32+
path: ./GH_ARTIFACTS
33+
- name: Make all binaries executable
34+
run: chmod +x GH_ARTIFACTS/**/*
35+
- name: Create zips
36+
run: cd GH_ARTIFACTS && find . -maxdepth 1 -mindepth 1 -type d -execdir zip -jr '{}.zip' '{}' \; && cd ..
37+
- uses: softprops/action-gh-release@v1
38+
with:
39+
draft: true
40+
files: |
41+
GH_ARTIFACTS/*.zip

.github/workflows/spec.yml

-17
This file was deleted.

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Uses [asar-cr](https://github.com/GeopJr/asar-cr).
1313

1414
## Installation
1515

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

1818
## Building
1919

shard.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: crycord
2-
version: 1.3.2
2+
version: 1.4.0
33

44
authors:
55
- GeopJr <[email protected]>

0 commit comments

Comments
 (0)