-
-
Notifications
You must be signed in to change notification settings - Fork 35
85 lines (70 loc) · 2.12 KB
/
Copy pathrelease.yml
File metadata and controls
85 lines (70 loc) · 2.12 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: Release
on:
release:
types:
- published
jobs:
dist:
name: Build distribution packages
strategy:
matrix:
os:
- ubuntu-22.04
- ubuntu-24.04
- ubuntu-24.04-arm
- macos-15
- macos-15-intel
- windows-2025
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Build release version
run: |
mkdir packcc-${{ github.ref_name }} &&
(
mkdir build-release &&
cd build-release &&
cmake -DCMAKE_BUILD_TYPE=Release .. &&
cmake --build . --config Release &&
cmake --install . --config Release --prefix $PWD/../packcc-${{ github.ref_name }}
) &&
tar cvzf packcc-${{ github.ref_name }}-${{ matrix.os }}.tar.gz packcc-${{ github.ref_name }}
- name: Store built distribution
uses: actions/upload-artifact@v6
with:
name: packcc-for-${{ matrix.os }}
path: |
packcc-*.tar.gz
retention-days: 1
release:
name: Release distribution packages
needs:
- dist
runs-on: ubuntu-latest
permissions:
contents: write # IMPORTANT: mandatory for making GitHub Releases
id-token: write # IMPORTANT: mandatory for sigstore
steps:
- name: Download distribution
uses: actions/download-artifact@v7
with:
pattern: packcc-for-*
path: dist/
merge-multiple: true
- name: Sign distribution with Sigstore
uses: sigstore/gh-action-sigstore-python@v3.0.0
with:
inputs: |
./dist/packcc-*.tar.gz
- name: Upload artifact signatures to GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Upload to GitHub Release using the `gh` CLI.
# `dist/` contains the built packages, and the
# sigstore-produced signatures and certificates.
run: |
gh release upload '${{ github.ref_name }}' dist/** --repo '${{ github.repository }}' --clobber