From 292a7328206d74c9c495ed52b4436ad405a94c51 Mon Sep 17 00:00:00 2001 From: 20PercentRendered <32398752+20PercentRendered@users.noreply.github.com> Date: Sat, 30 Apr 2022 23:24:09 +0300 Subject: [PATCH] auto-create-release test --- .github/workflows/cmake.yml | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index ce166ed..97ab893 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -33,13 +33,38 @@ jobs: # Build your program with the given configuration run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} - - name: Archive production artifacts + - name: Create artifacts uses: actions/upload-artifact@v3 with: name: linux-artifacts path: | ${{github.workspace}}/build/lib - + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + body: "" + draft: false + prerelease: false + - uses: papeloto/action-zip@v1 + with: + files: | + ${{github.workspace}}/build/lib + dest: creamlinux.zip + - name: Upload Release Assets + 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 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: ./creamlinux.zip + asset_name: creamlinux.zip + asset_content_type: application/zip - name: Test working-directory: ${{github.workspace}}/build # Execute tests defined by the CMake configuration.