-
Notifications
You must be signed in to change notification settings - Fork 107
48 lines (46 loc) · 1.58 KB
/
Copy pathdeploy.yml
File metadata and controls
48 lines (46 loc) · 1.58 KB
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
name: "Deploy"
on:
workflow_dispatch:
jobs:
deploy:
name: deploy
runs-on: ubuntu-latest
env:
MATIO_VERSION: "1.5.30"
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 5
submodules: recursive
- name: Install dependencies
timeout-minutes: 5
run: |
sudo apt-get update --fix-missing
sudo apt-get install -y gh texlive
- name: Check draft GH release exists
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
tag="v${MATIO_VERSION}"
exists=$(gh release view "$tag" --json isDraft --jq '.isDraft' || echo "error")
if [ "$exists" != "true" ]; then
echo "No draft release exists for tag $tag. Canceling deploy."
exit 1
fi
- name: Configure
run: |
./autogen.sh
./configure --enable-shared --enable-mat73 --enable-extended-sparse --with-pic --with-hdf5=${GITHUB_WORKSPACE}/hdf5-1.14.6/hdf5 CFLAGS="-O3" CPPFLAGS="-DNDEBUG"
- name: Build documentation
run: make -C documentation pdf html MAKEINFOFLAGS=--no-split
- name: Build distribution
run: |
make dist-gzip
make dist-zip
- name: Deploy to GH Releases
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
tag="v${MATIO_VERSION}"
gh release upload "$tag" ./documentation/matio_user_guide.html ./documentation/matio_user_guide.pdf ./matio-${MATIO_VERSION}.tar.gz ./matio-${MATIO_VERSION}.zip --clobber