Skip to content

Commit

Permalink
Add on-release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
alugowski committed May 26, 2023
1 parent f5a3e77 commit 6951df1
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/on-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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@v3

- 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

0 comments on commit 6951df1

Please sign in to comment.