-
Notifications
You must be signed in to change notification settings - Fork 1
76 lines (64 loc) · 1.85 KB
/
build.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
name: Build and release
on:
push:
branches: [ master ]
tags:
- v*
- prerelease
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Setup Nim environment
uses: jiro4989/[email protected]
# with:
# # The Nim version to download (if necessary) and use. Example: 1.0.2
# nim-version: # optional, default is stable
# Runs a set of commands using the runners shell
- name: Build app
run: |
docker build -t zegarek .
nimble appimageDocker
nimble windowsDocker
- uses: actions/upload-artifact@v2
with:
name: AppImage
path: build/Zegarek*.AppImage
- uses: actions/upload-artifact@v2
with:
name: Windows-64-zip
path: build/Zegarek*Windows-64.zip
- name: Set ref
id: set_ref
run: |
echo $GITHUB_REF
FILTERED_REF=`echo $GITHUB_REF | sed "s?refs/tags/v??"`
echo "::set-env name=FILTERED_REF::$FILTERED_REF"
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/v')
with:
files: |
build/Zegarek*.AppImage
build/Zegarek*Windows-64.zip
draft: false
prerelease: false
name: Zegarek ${{ env.FILTERED_REF }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Prerelease
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/prerelease')
with:
files: |
build/Zegarek*.AppImage
build/Zegarek*Windows-64.zip
draft: true
prerelease: true
name: Zegarek prerelease
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}