@@ -2,7 +2,7 @@ name: Generate static binaries
22on :
33 push :
44 branches :
5- - master
5+ - $default-branch
66 tags :
77 - ' *'
88 pull_request :
1111 schedule :
1212 # test master every Saturday at 08:00 UTC
1313 - cron : ' 0 8 * * 6'
14+ # Allows you to run this workflow manually from the Actions tab
15+ workflow_dispatch :
16+
1417jobs :
1518 learn-ocaml-www-zip :
1619 name : Build learn-ocaml-www.zip archive
4144 runs-on : ubuntu-latest
4245 strategy :
4346 matrix :
44- artifact : ["learn-ocaml-linux-x86_64.tar.gz "]
47+ artifact : ["learn-ocaml-linux-x86_64"]
4548 # we could use an env var, albeit it would be less convenient
4649 steps :
4750 - name : Check out the repo
@@ -57,13 +60,13 @@ jobs:
5760 - name : Archive static binaries
5861 run : |
5962 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 }}
6265 - name : Upload static binaries
6366 uses : actions/upload-artifact@v2
6467 with :
6568 name : ${{ matrix.artifact }}
66- path : ${{ matrix.artifact }}
69+ path : ${{ matrix.artifact }}/*
6770 static-bin-macos :
6871 name : Builds static Macos binaries
6972 if : ${{ github.event_name != 'schedule' || github.repository == 'ocaml-sf/learn-ocaml' }}
7376 OPAMDEPEXTYES : 1
7477 strategy :
7578 matrix :
76- artifact : ["learn-ocaml-darwin-x86_64.tar.gz "]
79+ artifact : ["learn-ocaml-darwin-x86_64"]
7780 # we could use an env var, albeit it would be less convenient
7881 steps :
7982 - name : Check out the repo
@@ -107,11 +110,10 @@ jobs:
107110 - name : Archive static binaries
108111 run : |
109112 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 }}
113115 - name : Upload static binaries
114116 uses : actions/upload-artifact@v2
115117 with :
116118 name : ${{ matrix.artifact }}
117- path : ${{ matrix.artifact }}
119+ path : ${{ matrix.artifact }}/*
0 commit comments