diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 74db193..5f943c8 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -1,8 +1,16 @@ name: CMake on: - push: - branches: [ master ] + workflow_dispatch: + inputs: + relName: + description: 'Release Name' + required: true + default: 'Release v1.0.0' + tagName: + description: 'Release tag' + required: true + default: "" pull_request: branches: [ master ] @@ -41,23 +49,23 @@ jobs: ${{github.workspace}}/build/lib - name: Create Release id: create_release - if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} + if: ${{ github.event_name == 'workflow_dispatch'}} 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 }} + tag_name: ${{ github.event.inputs.tagName }} + release_name: ${{ github.event.inputs.relName }} body: "" draft: false prerelease: false - uses: papeloto/action-zip@v1 - if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} + if: ${{ github.event_name == 'workflow_dispatch'}} with: files: build/lib dest: creamlinux.zip - name: Upload Release Assets - if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} + if: ${{ github.event_name == 'workflow_dispatch'}} id: upload-release-asset uses: actions/upload-release-asset@v1 env: