Skip to content

Commit

Permalink
Update release.yml
Browse files Browse the repository at this point in the history
Update release.yml so that it (hopefully) properly builds and cuts a release.
  • Loading branch information
NullCGT authored Jan 17, 2024
1 parent 959a7fd commit da7b342
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Create Release
name: Release
on:
push:
tags:
Expand All @@ -24,11 +24,25 @@ jobs:
configurePreset: 'release'
buildPreset: 'release'

- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake --preset=dev -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

- name: Test
working-directory: ${{github.workspace}}/build
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -C ${{env.BUILD_TYPE}}

- name: Create Package
run: |
zip -rq zenzizenzizenzic-${{ runner.os }} build/zenzizenzizenzic_ncurses build/data/ README.md
zip -rq ${{github.workspace}}/zenzizenzizenzic-${{ runner.os }} ${{github.workspace}}/build/zenzizenzizenzic_ncurses ${{github.workspace}}/build/data/ ${{github.workspace}}/README.md ${{github.workspace}}/LICENSE
- name: Release
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
Expand All @@ -38,13 +52,14 @@ jobs:
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./zenzizenzizenzic-${{ runner.os }}.zip
asset_name: zenzizenzizenzic-${{ runner.os }}.zip
asset_content_type: application/zip

0 comments on commit da7b342

Please sign in to comment.