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

unexpected behaviour #19

Closed
2 tasks
kaat0 opened this issue Apr 5, 2022 · 3 comments
Closed
2 tasks

unexpected behaviour #19

kaat0 opened this issue Apr 5, 2022 · 3 comments

Comments

@kaat0
Copy link

kaat0 commented Apr 5, 2022

I used the action with the option filenames: release.zip, and it succeeded. But it had consequences I was not aware of:

  • there were two uploads to zenodo:
    1. the file release.zip
    2. a snapshot of the repo
  • a GitHub release
  • a version tag on the repo

The GitHub action of zenodraft encompasses quite a lot of functionality. And I do get that there is a scenario where this is handy! But it does not fit in a workflow with other tasks. E.g., If I want to specify release notes with my GitHub release or need to upload the artifact to other services triggered by a tag push from the maintainer. See also #16.

Could you:

  • please specify the functionality in the documentation/README
  • provide toggles to turn off GitHub release and version tagging

I guess that the double upload to zenodo is unintended. My workaround is to use the CLI zenodraft since it seems that it can be used granularly.

@kaat0
Copy link
Author

kaat0 commented Apr 5, 2022

For documentation purposes - my workaround:

- name: "install zenodraft"
  run: npm install -g zenodraft

- name: "download artifact"
  uses: actions/download-artifact@v3

- name: "uploading to zenodo sandbox"
  id: zenodraft
  env:
    ZENODO_SANDBOX_ACCESS_TOKEN: ${{ secrets.ZENODO_SANDBOX_ACCESS_TOKEN }}
    COLLECTION: 1048737
  run: |
    ID=$(zenodraft --sandbox deposition create in-existing-collection $COLLECTION)
    zenodraft --sandbox file add $ID artifact/release.zip
    zenodraft --sandbox metadata update $ID artifact/metadata.json
    zenodraft --sandbox deposition publish $ID
    echo "::set-output name=doi::$(zenodraft --sandbox deposition show prereserved $ID)"

The varibale ${{ steps.zenodraft.outputs.doi }} can be used for other steps or jobs.

@jspaaks
Copy link
Member

jspaaks commented Apr 6, 2022

Hi @kaat0,

thanks for this feedback. The double upload is a bit weird, I need to look into that once I have a bit of time. Do you remember what the state of the repo was that generated this behavior? Or maybe you can point me to the release on Zenodo [Sandbox]? That'll come in handy during debug.

With regard to making the GitHub release and tag without asking, indeed that's something that should be documented and should be configurable.

@kaat0
Copy link
Author

kaat0 commented Apr 6, 2022

Hi 👋

the zenodo sandbox snapshot of the repo can be found here: Collection 1049011
Unfortunately, I have already overwritten the repo state. But, it was right after your pull request: 3eef5a1.

Many thanks for your effort and zenodraft!

@kaat0 kaat0 closed this as completed Apr 6, 2022
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