Skip to content

Commit 4d9643d

Browse files
committed
raise an error if the file does not exist when uploading an artifact
1 parent 5dc4ad6 commit 4d9643d

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

.github/workflows/build-release.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ jobs:
122122
- name: Extract frontend files from linux-amd64 package
123123
run: |
124124
New-Item -ItemType Directory -Path package
125-
tar -xzf (Get-ChildItem artifacts\ezbookkeeping-v*-linux-amd64.tar.gz) -C package
125+
tar -xzf (Get-ChildItem artifacts\ezbookkeeping-${{ github.ref_name }}-linux-amd64.tar.gz) -C package
126126
127127
- name: Set up Go
128128
uses: actions/setup-go@v6
@@ -176,7 +176,8 @@ jobs:
176176
uses: actions/upload-artifact@v4
177177
with:
178178
name: ezbookkeeping-${{ github.ref_name }}-windows-x64
179-
path: ezbookkeeping-v*-windows-x64.zip
179+
path: ezbookkeeping-${{ github.ref_name }}-windows-x64.zip
180+
if-no-files-found: error
180181

181182
publish-release:
182183
runs-on: ubuntu-latest

.github/workflows/build-snapshot.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ jobs:
121121
- name: Extract frontend files from linux-amd64 package
122122
run: |
123123
New-Item -ItemType Directory -Path package
124-
tar -xzf (Get-ChildItem artifacts\ezbookkeeping-dev-*-linux-amd64.tar.gz) -C package
124+
tar -xzf (Get-ChildItem artifacts\ezbookkeeping-dev-${{ github.run_id }}-linux-amd64.tar.gz) -C package
125125
126126
- name: Set up Go
127127
uses: actions/setup-go@v6
@@ -174,4 +174,5 @@ jobs:
174174
uses: actions/upload-artifact@v4
175175
with:
176176
name: ezbookkeeping-dev-${{ github.run_id }}-windows-x64
177-
path: ezbookkeeping-dev-*-windows-x64.zip
177+
path: ezbookkeeping-dev-${{ github.run_id }}-windows-x64.zip
178+
if-no-files-found: error

0 commit comments

Comments
 (0)