-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (52 loc) · 1.74 KB
/
release.yml
File metadata and controls
62 lines (52 loc) · 1.74 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
name: Generate Release
on:
push:
tags:
- "v*.*.*"
jobs:
build-release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install CMake and Ninja
run: |
sudo apt-get update
sudo apt-get install -y cmake ninja-build zip
- name: Capture version
id: version
run: |
TAG_REF="${GITHUB_REF##*/}"
VERSION="${TAG_REF#v}"
echo "tag=$TAG_REF" >> $GITHUB_OUTPUT
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Generate release artifact
run: |
python scripts/build_single_file.py --check || python scripts/build_single_file.py
echo "Generated dist/single_file/ab.cmake"
- name: Generate vcpkg registry port
shell: pwsh
run: ./scripts/build_vcpkg_port.ps1 -Tag "${{ steps.version.outputs.tag }}"
- name: Upload release artifact
uses: actions/upload-artifact@v4
with:
name: abcmake-${{ steps.version.outputs.tag }}
path: |
dist/single_file/ab.cmake
dist/vcpkg-port/
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
name: abcmake ${{ steps.version.outputs.tag }}
body: |
Automated release for ${{ steps.version.outputs.tag }}.
The single-file module and CMake package are attached as assets.
**vcpkg port**: ready-to-use port files are in the release artifacts.
files: |
dist/single_file/ab.cmake
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}