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.