Skip to content

Commit

Permalink
fix(auto release): artifact loads correctly to latest release
Browse files Browse the repository at this point in the history
  • Loading branch information
bradday4 committed Jul 19, 2021
1 parent cac1019 commit 04698fe
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Semantic Release
on:
push:
branches:
- main
- dev

jobs:
generate-exe:
Expand Down Expand Up @@ -41,6 +41,9 @@ jobs:
with:
name: pattern_gen

- name: runs ls
run: ls ${{ github.workspace }}

- name: Get Latest Release
uses: octokit/request-action@v2.x
id: get_latest_release
Expand All @@ -49,15 +52,13 @@ jobs:
repository: ${{ github.repository }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: get upload url
id: get_upload_url
run: |
url=$(echo "$response" | jq -r '.upload_url')
echo "::set-output name=url::$url"
env:
response: ${{ steps.get_latest_release.outputs.data }}

- name: Upload a Release Asset
uses: actions/upload-release-asset@v1.0.2
env:
Expand All @@ -66,8 +67,8 @@ jobs:
# The URL for uploading assets to the release
upload_url: ${{steps.get_upload_url.outputs.url}}
# The path to the asset you want to upload
asset_path: ${{ github.workspace }}
asset_path: ${{ github.workspace }}/pattern_gen.exe
# The name of the asset you want to upload
asset_name: pattern_gen.zip
asset_name: pattern_gen.exe
# The content-type of the asset you want to upload. See the supported Media Types here: https://www.iana.org/assignments/media-types/media-types.xhtml for more information
asset_content_type: application/zip
asset_content_type: application/vnd.microsoft.portable-executable

0 comments on commit 04698fe

Please sign in to comment.