mirror of
https://github.com/fastfloat/fast_float.git
synced 2026-10-28 18:07:16 +08:00
- New release.yml (workflow_dispatch): bumps patch/minor/major, runs script/release.py, tests the amalgamation and the full test suite, commits and tags on main, and publishes a release with fast_float.h. - on-release.yml: the upload failed with 'Validation Failed' because fast_float.h was already attached to the release. Use 'gh release upload --clobber' instead of the deprecated actions/upload-release-asset, and run the amalgamation test binary. - release.py: also bump MODULE.bazel (stuck at 8.2.4) and exit non-zero if amalgamation fails.
42 lines
1007 B
YAML
42 lines
1007 B
YAML
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@v7
|
|
|
|
- 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
|
|
./a.out
|
|
|
|
- name: Upload Release Asset
|
|
# --clobber replaces an asset that was already attached by hand, which
|
|
# would otherwise make the upload fail.
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
run: |
|
|
gh release upload "${{ github.event.release.tag_name }}" \
|
|
build/fast_float/fast_float.h --clobber
|