-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (38 loc) · 1.37 KB
/
Copy pathrelease.yml
File metadata and controls
49 lines (38 loc) · 1.37 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
name: Create Release
permissions:
contents: write
on:
push:
tags:
- 'v*.*.*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up CMake, Ninja, and compiler
run: sudo apt-get update && sudo apt-get install -y cmake ninja-build g++
- name: Configure project (Release)
run: cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
- name: Install project to versioned dist/
run: cmake --install build --config Release --prefix dist/timeduration-cpp-${{ github.ref_name }}
- name: Copy README and LICENSE
run: |
cp README.md LICENSE dist/timeduration-cpp-${{ github.ref_name }}/
- name: Create zip archive
run: |
cd dist
zip -r ../timeduration-cpp-${{ github.ref_name }}.zip timeduration-cpp-${{ github.ref_name }}
- name: Generate SHA256 checksum
run: sha256sum timeduration-cpp-${{ github.ref_name }}.zip > SHA256_checksum.txt
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
name: Release ${{ github.ref_name }}
files: |
timeduration-cpp-${{ github.ref_name }}.zip
SHA256_checksum.txt
include/timeduration/timeduration.hpp
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}