git.iko.soy/typeable/pandoc
on master help sign in
Improvements to nightly.yml.
78f552eJohn MacFarlane
.github/workflows/nightly.yml+20−11
@@ -2,7 +2,7 @@ name: Nightly
2
2
3on:
3on:
4 schedule:
4 schedule:
5− - cron: '21 7 * * *'
5+ - cron: '21 * * * *'
6
6
7jobs:
7jobs:
8 linux:
8 linux:
@@ -26,15 +26,17 @@ jobs:
26 cabal v2-install . pandoc-citeproc
26 cabal v2-install . pandoc-citeproc
27 - name: Install artifact
27 - name: Install artifact
28 run: |
28 run: |
29− export ARTIFACTS=./pandoc-nightly-linux-$(date +%Y-%m%-d)-${GITHUB_SHA}
29+ export SUFFIX=nightly-$(date +%Y-%m-%d)
30+ export ARTIFACTS=nightly-linux
30 mkdir -p ${ARTIFACTS}
31 mkdir -p ${ARTIFACTS}
31− for f in $(find dist-newstyle -name 'pandoc*' -type f -executable); do cp $f ${ARTIFACTS}/; done
32+ cp $HOME/.cabal/bin/pandoc ${ARTIFACTS}/pandoc-${SUFFIX}
33+ cp $HOME/.cabal/bin/pandoc-citeproc ${ARTIFACTS}/pandoc-citeproc-${SUFFIX}
32 cp COPYRIGHT ${ARTIFACTS}/
34 cp COPYRIGHT ${ARTIFACTS}/
33− tar cvzf nightly-linux.tgz ${ARTIFACTS}
35+ echo "Built from ${GITHUB_SHA}" > ${ARTIFACTS}/README.nightly.txt
34 - uses: actions/upload-artifact@master
36 - uses: actions/upload-artifact@master
35 with:
37 with:
36 name: nightly-linux
38 name: nightly-linux
37− path: nightly-linux.tgz
39+ path: nightly-linux
38
40
39 windows:
41 windows:
40
42
@@ -53,15 +55,19 @@ jobs:
53 - name: Build artifacts
55 - name: Build artifacts
54 shell: cmd
56 shell: cmd
55 run: |
57 run: |
58+ for /f "tokens=2,3,4 usebackq delims=:/ " %a in ('%date%') do set OURDATE=%c-%a-%b
59+ export SUFFIX=nightly-%OURDATE%
56− set ARTIFACTS=pandoc-nightly-windows-$(date +%Y-%m%-d)-${GITHUB_SHA}
60+ export ARTIFACTS=nightly-windows
57 mkdir %ARTIFACTS%
61 mkdir %ARTIFACTS%
58 stack install --local-bin-path %ARTIFACTS% pandoc pandoc-citeproc
62 stack install --local-bin-path %ARTIFACTS% pandoc pandoc-citeproc
63+ rename %ARTIFACTS%/pandoc %ARTIFACTS%/pandoc-%SUFFIX%
64+ rename %ARTIFACTS%/pandoc-citeproc %ARTIFACTS%/pandoc-citeproc-%SUFFIX%
59 copy COPYRIGHT %ARTIFACTS%/COPYRIGHT.txt
65 copy COPYRIGHT %ARTIFACTS%/COPYRIGHT.txt
60− 7z a nightly-windows.zip %ARTIFACTS%
66+ echo "Built from ${GITHUB_SHA}" > ${ARTIFACTS}/README.nightly.txt
61 - uses: actions/upload-artifact@master
67 - uses: actions/upload-artifact@master
62 with:
68 with:
63 name: nightly-windows
69 name: nightly-windows
64− path: nightly-windows.tgz
70+ path: nightly-windows
65
71
66 macos:
72 macos:
67
73
@@ -79,13 +85,16 @@ jobs:
79 ./stack build --dependencies-only pandoc pandoc-citeproc
85 ./stack build --dependencies-only pandoc pandoc-citeproc
80 - name: Build artifacts
86 - name: Build artifacts
81 run: |
87 run: |
82− export ARTIFACTS=./pandoc-nightly-macos-$(date +%Y-%m%-d)-${GITHUB_SHA}
88+ export SUFFIX=nightly-$(date +%Y-%m-%d)
89+ export ARTIFACTS=nightly-macos
83 mkdir -p ${ARTIFACTS}
90 mkdir -p ${ARTIFACTS}
84 ./stack install --local-bin-path ${ARTIFACTS}/ pandoc pandoc-citeproc
91 ./stack install --local-bin-path ${ARTIFACTS}/ pandoc pandoc-citeproc
92+ mv ${ARTIFACTS}/pandoc ${ARTIFACTS}/pandoc-${SUFFIX}
93+ mv ${ARTIFACTS}/pandoc-citeproc ${ARTIFACTS}/pandoc-citeproc-${SUFFIX}
85 cp COPYRIGHT ${ARTIFACTS}/
94 cp COPYRIGHT ${ARTIFACTS}/
86− zip -r nightly-macos.zip ${ARTIFACTS}
95+ echo "Built from ${GITHUB_SHA}" > ${ARTIFACTS}/README.nightly.txt
87 - uses: actions/upload-artifact@master
96 - uses: actions/upload-artifact@master
88 with:
97 with:
89 name: nightly-macos
98 name: nightly-macos
90− path: nightly-macos.zip
99+ path: nightly-macos
91
100