-
Notifications
You must be signed in to change notification settings - Fork 7
68 lines (59 loc) · 1.85 KB
/
release.yml
File metadata and controls
68 lines (59 loc) · 1.85 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Release
on:
workflow_call:
permissions:
contents: write
pages: write
id-token: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
pattern: '*'
merge-multiple: true
- name: Generate release tag
run: echo "TAG=v$(date +'%Y%m%d%H%M%S')-$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Verify artifacts
run: |
echo "Checking artifacts..."
ls -R artifacts || true
if [ ! "$(find artifacts -type f | wc -l)" -gt 0 ]; then
echo "No artifacts found. Failing release job."
exit 1
fi
- name: Create packages
shell: bash
run: |
for platform_dir in artifacts/*; do
if [ -d "$platform_dir" ] && [ "$(find "$platform_dir" -type f | wc -l)" -gt 0 ]; then
pkg_name=$(basename "$platform_dir")
mkdir -p "GekkoNet-$pkg_name"
cp -r "$platform_dir/"* "GekkoNet-$pkg_name/"
tar -czf "GekkoNet-$pkg_name-Release.tar.gz" -C "GekkoNet-$pkg_name" .
fi
done
- name: Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ env.TAG }}
files: GekkoNet-*-Release.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
docs:
needs: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: sudo apt-get update && sudo apt-get install -y doxygen graphviz
- run: |
cmake -B build -DBUILD_DOCS=ON
cmake --build build --target docs
- uses: actions/upload-pages-artifact@v3
with:
path: build/GekkoLib/docs/html
- uses: actions/deploy-pages@v4