github: fix github wokflow while pushing a tag
authorTarek BOCHKATI <tarek.bouchkati@gmail.com>
Sun, 31 Jan 2021 23:18:14 +0000 (00:18 +0100)
committerAntonio Borneo <borneo.antonio@gmail.com>
Wed, 3 Feb 2021 09:27:03 +0000 (09:27 +0000)
this fix permits to add correctly the generated artifact (windows binaries)
into the release section.

Change-Id: Ia982370d3a1e08c623ebcabb5ac97e9fb49d00e0
Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
Reviewed-on: http://openocd.zylin.com/6047
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
.github/workflows/snapshot.yml

index e9a95ffb5dca9f6f5850333b22f8bd281a9f5580..9e871de66f46d84f1eb8326c89b656c1b5d2f4f7 100644 (file)
@@ -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