Reputation: 30074
I am using Actions to compile an executable and then upload it:
name: note
on: push
jobs:
cli:
runs-on: windows-latest
defaults:
run:
working-directory: ./cli
steps:
- uses: actions/checkout@master
- run: go build -v
- run: dir
- name: upload cli.exe
uses: actions/upload-artifact@v2
with:
name: cli.exe
path: cli.exe
This results in:
The dir
command shows that cli.exe
is there, but it seems that I do not address it correctly for the upload. How to fix that?
Upvotes: 0
Views: 236
Reputation: 30074
The path of the upload must be provided from the root of the checked-out repo. In my case, the upload section needs therefore to be
- name: upload cli.exe
uses: actions/upload-artifact@v2
with:
name: cli.exe
path: cli/cli.exe
In other words, actions/upload-artifact
does not take into account the working-directory
setting.
Upvotes: 2