From 3ead2633af913ee8777d69405e2dbef6a0fadc1d Mon Sep 17 00:00:00 2001 From: Tarek BOCHKATI Date: Mon, 1 Feb 2021 00:18:14 +0100 Subject: [PATCH] github: fix github wokflow while pushing a tag this fix permits to add correctly the generated artifact (windows binaries) into the release section. Change-Id: Ia982370d3a1e08c623ebcabb5ac97e9fb49d00e0 Signed-off-by: Tarek BOCHKATI Reviewed-on: http://openocd.zylin.com/6047 Tested-by: jenkins Reviewed-by: Antonio Borneo --- .github/workflows/snapshot.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index e9a95ffb5..9e871de66 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -85,19 +85,24 @@ jobs: with: name: ${{ env.ARTIFACT_NAME }} path: ${{ env.ARTIFACT_PATH }} - - name: Get the upload URL for a release - id: get_release + - name: Create Release + id: create_release if: startsWith(github.ref, 'refs/tags/') - uses: bruceadams/get-release@v1.2.0 + uses: actions/create-release@v1.1.4 env: - GITHUB_TOKEN: ${{ github.token }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: ${{ github.ref }} + draft: false + prerelease: false - name: Release OpenOCD packaged for windows if: startsWith(github.ref, 'refs/tags/') uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - upload_url: ${{ steps.get_release.outputs.upload_url }} + upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: ${{ env.ARTIFACT_PATH }} asset_name: ${{ env.ARTIFACT_NAME }} asset_content_type: application/gzip