forked from fastfloat/fast_float
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (34 loc) · 993 Bytes
/
on-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
name: On Release
# By default, a workflow only has read permissions.
# Add the needed permission to write release assets
permissions:
contents: write
on:
release:
types:
- published
jobs:
build:
name: Add Release Assets
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Amalgamate fast_float.h
run: |
mkdir build
mkdir build/fast_float
python3 ./script/amalgamate.py > build/fast_float/fast_float.h
- name: Test Amalgamation
run: |
cp tests/string_test.cpp build/
cd build
g++ string_test.cpp
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: build/fast_float/fast_float.h
asset_name: fast_float.h
asset_content_type: text/plain