-
Notifications
You must be signed in to change notification settings - Fork 5
75 lines (60 loc) · 1.89 KB
/
fake-release.yml
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
69
70
71
72
73
74
75
name: Release (test)
on: push
env:
BUILD_TYPE: Release
jobs:
build:
strategy:
matrix:
platform:
- "ubuntu-latest"
include:
- platform: "ubuntu-latest"
vcpkg_triplet: "x64-linux"
runs-on: ${{ matrix.platform }}
permissions:
actions: write
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Install vcpkg
run: |
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg && ./bootstrap-vcpkg.sh
echo "VCPKG_ROOT=${{github.workspace}}/vcpkg" >> $GITHUB_ENV
echo "${{github.workspace}}/vcpkg" >> $GITHUB_PATH
./vcpkg integrate install
shell: bash
- name: Package
run: |
cmake --preset=default -DVCPKG_TARGET_TRIPLET=${{matrix.vcpkg_triplet}} -B ${{github.workspace}}/pack -DCMAKE_BUILD_TYPE=Release -DNOTEST=1
cmake --build ${{github.workspace}}/pack --config Release
cpack --config ${{github.workspace}}/pack/CPackConfig.cmake -C Release -G ZIP
- uses: actions/upload-artifact@v4
with:
name: ${{matrix.platform}} binaries
path: ${{github.workspace}}/*.zip
release:
needs:
- build
name: "Release"
runs-on: "ubuntu-latest"
permissions: write-all
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v4
id: download
with:
path: ${{ github.workspace }}/artifacts
- name: List artifacts
run: ls -l ${{ github.workspace }}/artifacts
- name: Test release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.PAT }}
automatic_release_tag: "fake-release"
prerelease: true
title: "Fake Release"
files: |
${{steps.download.outputs.download-path}}/*/*.zip