Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removeArtifacts doesn't remove artifacts #120

Closed
Bilge opened this issue Sep 23, 2021 · 3 comments
Closed

removeArtifacts doesn't remove artifacts #120

Bilge opened this issue Sep 23, 2021 · 3 comments

Comments

@Bilge
Copy link

Bilge commented Sep 23, 2021

Describe the bug
removeArtifacts does not remove any files attached to the release. Probably it only works if artifacts are listed explicitly, however I do not list artifacts in this action because I use another action to upload them (that supports renaming on upload).

To Reproduce

      - name: Create release
        id: create_release
        uses: ncipollo/release-action@v1
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          allowUpdates: true
          removeArtifacts: true

      - name: Upload artifact
        uses: actions/upload-release-asset@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          upload_url: ${{ steps.create_release.outputs.upload_url }}
          asset_path: my.tar.xz
          asset_name: My Product v${{ env.tag }}.tar.xz # This renames the uploaded file.
          asset_content_type: application/x-xz

Expected behavior
Uploading the same tag/release is idempotent.

Actual behavior

Run actions/upload-release-asset@v1
Error: Validation Failed

The error message from the upload action is not very clear, but it fails because the artifact already exists, because ncipollo/release-action did not remove them, despite being configured to.

@ncipollo
Copy link
Owner

ncipollo commented Oct 3, 2021

Moved the artifact removal code outside of the artifact uploader. Will kick off a new release in a little bit.

@ncipollo
Copy link
Owner

ncipollo commented Oct 3, 2021

v1.8.10 and v1 have been updated with this fix. Let me know if you run into any issues with this flag!

@Bilge
Copy link
Author

Bilge commented Oct 4, 2021

Shouldn't the @v1 specifier use v1.8.10 (the latest v1.*) automatically?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants