Skip to content

Commit

Permalink
Archive GitHub actions artifacts
Browse files Browse the repository at this point in the history
Common practice is to use the binaries for testing fixes and new features for people waiting them without the need of recompiling on the end-user side
  • Loading branch information
shtirlic authored Oct 25, 2023
1 parent e9ff57f commit 1003d9f
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/cmake-multi-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
- name: Set golded version
shell: bash
run: |
Expand All @@ -71,3 +72,33 @@ jobs:
- name: Build
# Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}

- uses: benjlevesque/[email protected]
id: short-sha
with:
length: 6

- if: matrix.os == 'windows-latest'
name: Zip binaries
run: >
git archive --format=zip -o golded-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.c_compiler }}-${{ steps.short-sha.outputs.sha }}.zip
--add-file=${{ steps.strings.outputs.build-output-dir }}/golded3/Release/golded.exe
--add-file=${{ steps.strings.outputs.build-output-dir }}/goldnode/Release/goldnode.exe
--add-file=${{ steps.strings.outputs.build-output-dir }}/rddt/Release/rddt.exe
HEAD README.md
- if: matrix.os != 'windows-latest'
name: Zip binaries
run: >
git archive --format=zip -o golded-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.c_compiler }}-${{ steps.short-sha.outputs.sha }}.zip
--add-file=${{ steps.strings.outputs.build-output-dir }}/golded3/golded
--add-file=${{ steps.strings.outputs.build-output-dir }}/goldnode/goldnode
--add-file=${{ steps.strings.outputs.build-output-dir }}/rddt/rddt
HEAD README.md
- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: golded-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.c_compiler }}-${{ steps.short-sha.outputs.sha }}
path: |
golded-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.c_compiler }}-${{ steps.short-sha.outputs.sha }}.zip

0 comments on commit 1003d9f

Please sign in to comment.