Skip to content

Commit

Permalink
Rename amalgamated file
Browse files Browse the repository at this point in the history
  • Loading branch information
VioletXF committed Mar 7, 2024
1 parent dc4f1ef commit 672ec8c
Showing 1 changed file with 22 additions and 7 deletions.
29 changes: 22 additions & 7 deletions .github/workflows/publish_amal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,27 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: cargo install cpp-amalgamate
run: cargo install cpp-amalgamate
- name: Cache cpp-amalgamate
uses: actions/cache@v2
with:
path: |
~/.cargo/bin/cpp-amalgamate
~/.cargo/.crates.toml
~/.cargo/.crates2.json
key: ${{ runner.os }}-cpp-amalgamate-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cpp-amalgamate-
- name: Install cpp-amalgamate if not cached
run: |
if ! command -v cpp-amalgamate &> /dev/null
then
cargo install cpp-amalgamate
fi
- name: cpp-amalgamate
run: |
rm -f amalgamated.hpp
cpp-amalgamate ./src/** >> amalgamated.hpp
rm -f bms_parser.hpp
cpp-amalgamate ./src/** >> bms_parser.hpp
# create new release
- name: Create Release
id: create_release
Expand All @@ -29,7 +44,7 @@ jobs:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
You can find the amalgamated code in the file `amalgamated.hpp`.
You can find the amalgamated code in the file `bms_parser.hpp`.
draft: false
prerelease: false
# upload amalgamated code
Expand All @@ -40,6 +55,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./amalgamated.hpp
asset_name: amalgamated.hpp
asset_path: ./bms_parser.hpp
asset_name: bms_parser.hpp
asset_content_type: text/plain

0 comments on commit 672ec8c

Please sign in to comment.