@@ -2,7 +2,7 @@ name: Generate static binaries
2
2
on :
3
3
push :
4
4
branches :
5
- - master
5
+ - $default-branch
6
6
tags :
7
7
- ' *'
8
8
pull_request :
11
11
schedule :
12
12
# test master every Saturday at 08:00 UTC
13
13
- cron : ' 0 8 * * 6'
14
+ # Allows you to run this workflow manually from the Actions tab
15
+ workflow_dispatch :
16
+
14
17
jobs :
15
18
learn-ocaml-www-zip :
16
19
name : Build learn-ocaml-www.zip archive
41
44
runs-on : ubuntu-latest
42
45
strategy :
43
46
matrix :
44
- artifact : ["learn-ocaml-linux-x86_64.tar.gz "]
47
+ artifact : ["learn-ocaml-linux-x86_64"]
45
48
# we could use an env var, albeit it would be less convenient
46
49
steps :
47
50
- name : Check out the repo
@@ -57,13 +60,13 @@ jobs:
57
60
- name : Archive static binaries
58
61
run : |
59
62
uname -a
60
- tar cvzf ${{ matrix.artifact }} \
61
- learn-ocaml learn-ocaml-server learn-ocaml-client
63
+ mkdir -p ${{ matrix.artifact }}
64
+ cp learn-ocaml learn-ocaml-server learn-ocaml-client ${{ matrix.artifact }}
62
65
- name : Upload static binaries
63
66
uses : actions/upload-artifact@v2
64
67
with :
65
68
name : ${{ matrix.artifact }}
66
- path : ${{ matrix.artifact }}
69
+ path : ${{ matrix.artifact }}/*
67
70
static-bin-macos :
68
71
name : Builds static Macos binaries
69
72
if : ${{ github.event_name != 'schedule' || github.repository == 'ocaml-sf/learn-ocaml' }}
73
76
OPAMDEPEXTYES : 1
74
77
strategy :
75
78
matrix :
76
- artifact : ["learn-ocaml-darwin-x86_64.tar.gz "]
79
+ artifact : ["learn-ocaml-darwin-x86_64"]
77
80
# we could use an env var, albeit it would be less convenient
78
81
steps :
79
82
- name : Check out the repo
@@ -107,11 +110,10 @@ jobs:
107
110
- name : Archive static binaries
108
111
run : |
109
112
uname -a
110
- cd _build/install/default/bin
111
- tar cvzhf "$OLDPWD"/${{ matrix.artifact }} \
112
- learn-ocaml learn-ocaml-server learn-ocaml-client
113
+ mkdir -p ${{ matrix.artifact }}
114
+ cp _build/install/default/bin/learn-ocaml{,-server,-client} ${{ matrix.artifact }}
113
115
- name : Upload static binaries
114
116
uses : actions/upload-artifact@v2
115
117
with :
116
118
name : ${{ matrix.artifact }}
117
- path : ${{ matrix.artifact }}
119
+ path : ${{ matrix.artifact }}/*
0 commit comments