-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (69 loc) · 1.93 KB
/
crystal.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Crystal CI
on:
push:
branches:
- main
- release-*
tags:
- v*
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- container: crystallang/crystal:1.0.0
name: ubuntu
- container: crystallang/crystal:1.0.0-alpine
name: alpine
container:
image: ${{ matrix.container }}
steps:
- name: "Install yaml deps"
if: ${{ matrix.name == 'alpine' }}
run: apk add --update yaml-dev yaml-static
- uses: actions/checkout@v2
- name: Install dependencies
run: shards install
- name: Build concurry binary
run: |
mkdir dist
crystal build ./src/concurry.cr \
--release \
--progress \
--static \
-o ./dist/concurry-${{ matrix.name }}
- name: upload artifacts
uses: actions/upload-artifact@master
with:
name: concurry-${{ matrix.name }}
path: ./dist/concurry-${{ matrix.name }}
publish:
name: "Publish releases"
needs: build
runs-on: ubuntu-latest
if: startswith(github.ref, 'refs/tags/v')
env:
ARTIFACT_DIR: ./release
steps:
- name: "Setup directory"
run: mkdir -p ${{ env.ARTIFACT_DIR }}
# Artifacts
- name: Download artifacts [concurry-alpine]
uses: actions/download-artifact@master
with:
name: concurry-alpine
path: ${{ env.ARTIFACT_DIR }}
- name: Download artifacts [concurry-ubuntu]
uses: actions/download-artifact@master
with:
name: concurry-ubuntu
path: ${{ env.ARTIFACT_DIR }}
- uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
file: ${{ env.ARTIFACT_DIR }}/*
overwrite: true
file_glob: true