Skip to content

Commit

Permalink
fix(action) includeDebug usage
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog committed Jul 12, 2020
1 parent b2ff291 commit 58d7b86
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changes/fix-debug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"action": patch
---

Fixes the `includeDebug` input usage.
1 change: 1 addition & 0 deletions .github/workflows/test-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ jobs:
releaseBody: "See the assets to download this version and install."
releaseDraft: true
prerelease: false
includeDebug: true
- uses: ./
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion src/upload-release-assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default async function uploadAssets(uploadUrl: string, assets: string[])

const ext = path.extname(assetPath)
const filename = path.basename(assetPath).replace(ext, '')
const assetName = path.dirname(assetPath).endsWith('debug') ? `${filename}-debug${ext}` : `${filename}${ext}`
const assetName = path.dirname(assetPath).includes(`target${path.sep}debug`) ? `${filename}-debug${ext}` : `${filename}${ext}`
console.log(`Uploading ${assetName}...`)
await github.repos.uploadReleaseAsset({
url: uploadUrl,
Expand Down

0 comments on commit 58d7b86

Please sign in to comment.