ncipollo / release-action

An action which manages a github release

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't find artifacts with new release

davesbrown opened this issue · comments

Describe the bug
Artifact pattern did not match any files

The action definition were of pattern like:
- name: Create Release
uses: ncipollo/release-action@v1
with:
artifacts: |
${{ github.workspace }}.artifacts\Version.txt
${{ github.workspace }}.artifacts\project1.7z
${{ github.workspace }}.artifacts\project2.7z

I tried a couple quoting schemes, like the whole path, but with v1.11.0 the artifacts are not found. Reverting back v1.10.0 continues to work.

This seems to be working fine in my test repo - https://github.com/ncipollo/actions-playground/actions/runs/3177845986. I did update node & a bunch of dependencies between 1.10.0 & 1.11.0. It's possible that the globber I am using now is more strict or the inputs into the action are processed a little differently.

Here's what I'd recommend trying on your end:

  • Print out ${{ github.workspace }} to see where it's pointing.
  • Print out ${{ github.workspace }}.artifacts\Version.txt to verify it in fact exists.
  • Try with just a single input to rule out there being a formatting problem with your lines.

If you can provide some additional logs or a repo where this is broke I can look further but this seems to be working in my test cases.

Same here, reverted to 1.10.0
We have some steps with bunch of artifacts:

      - uses: actions/upload-artifact@v2
        name: Upload webjob.zip
        with:
          path: ${{ github.workspace }}\webjob.zip

and next step fails:

      - name: Make release candidate
        if: startsWith(github.ref, 'refs/heads/release')
        uses: ncipollo/release-action@v1
        with:
          artifacts: ${{ github.workspace }}\*.zip

with:
Error undefined: Artifact pattern : C:\actions-runner2\_work\cmp\cmp\*.zip did not match any files
Not sure if it helps - agents are on the Windows OS as you can see from the path
Artifacts themself in the right place, really exist, just action couldn't find them.

- run: |
         ls ${{ github.workspace }}\*.zip
Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a---           10/4/2022 10:15 AM       52651962 api.zip
-a---           10/4/2022 10:15 AM       34208100 webjob.zip
-a---           10/4/2022 10:13 AM      150434566 web.zip
-a---           10/4/2022 10:14 AM       34783924 tools.zip
-a---           10/4/2022 10:15 AM       14795556 liquibase_patches.zip

Fails even with the single artifact

      - name: Make release candidate
        if: startsWith(github.ref, 'refs/heads/task/playground-release-action')
        uses: ncipollo/release-action@v1
        with:
          artifacts: ${{ github.workspace }}\webjob.zip
          token: ${{ github.token }}
          tag: ${{ steps.vars.outputs.branch_name }}
          allowUpdates: true
          artifactErrorsFailBuild: true
          prerelease: true
          body: "Release candidate ${{ steps.vars.outputs.branch_name }}. build number: ${{ github.run_number }}"

Error undefined: Artifact pattern :C:\actions-runner2\_work\cmp\cmp\webjob.zip did not match any file

Bah - there was a breaking change in glob for windows users - isaacs/node-glob#467. Thanks for the context @olllol!

If someone has a chance could you re-run your action against @main? It should be fixed there, just want to verify it works outside of my test repo.

I can confirm - everything is smooth and fine ! Thank you !

      - name: Make release candidate
        if: startsWith(github.ref, 'refs/heads/task/playground-release-action')
        uses: ncipollo/release-action@main
        with:
          artifacts: ${{ github.workspace }}\*.zip

body: Release candidate playground-release-action. build number: 2236
image
image

This should be fixed in v1.11.1 & v1 now. Thanks for catching this and help testing!!