Skip to content

Comments

Allow empty inputs with release artifacts#110

Merged
woodruffw merged 3 commits intosigstore:mainfrom
JeanChristopheMorinPerso:allow_empty_inpts_with_release_artifacts
Feb 23, 2024
Merged

Allow empty inputs with release artifacts#110
woodruffw merged 3 commits intosigstore:mainfrom
JeanChristopheMorinPerso:allow_empty_inpts_with_release_artifacts

Conversation

@JeanChristopheMorinPerso
Copy link
Contributor

@JeanChristopheMorinPerso JeanChristopheMorinPerso commented Feb 18, 2024

Summary

Resolves #109

Some projects don't generate artifacts as part of their releases but would still like to have their source archives attached to releases signed (using release-signing-artifacts). This was previously not possible to do with this action because inputs was a required input.

With this pull request, it will be possible to not specify inputs and use release-signing-artifacts for releases:

permissions:
  contents: write

# ...

- uses: sigstore/[email protected]
  with:
    # Only valid on release events
    release-signing-artifacts: true

Note that inputs is still required if release-signing-artifacts is not true and the event type is not release. In this case, the action will raise a descriptive error.

Release Note

  • inputs was made optional when the event type is release and release-signing-artifacts is true.

Documentation

I adjusted the README to reflect the changes.

Tests

I'm not sure if I should add tests or not. I tested locally different scenarios and also ran the selftest workflow in my fork (https://github.com/JeanChristopheMorinPerso/gh-action-sigstore-python/actions/runs/7949857773), but I'm not sure how to properly test the release scenario without releasing a fork of the action...

@woodruffw
Copy link
Member

Thanks @JeanChristopheMorinPerso! I'm reviewing now.

@woodruffw woodruffw self-requested a review February 20, 2024 16:45
@woodruffw woodruffw added the enhancement New feature or request label Feb 20, 2024
Copy link
Member

@woodruffw woodruffw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! One nitpick.

@woodruffw
Copy link
Member

I'm not sure if I should add tests or not. I tested locally different scenarios and also ran the selftest workflow in my fork (https://github.com/JeanChristopheMorinPerso/gh-action-sigstore-python/actions/runs/7949857773), but I'm not sure how to properly test the release scenario without releasing a fork of the action...

Yeah, unfortunately tests here will probably be a PITA. I'm okay with skipping them for now; if we hit bugs on this path in the future, we'll investigate mocking up a release environment to test in.

Signed-off-by: Jean-Christophe Morin <[email protected]>
Copy link
Member

@woodruffw woodruffw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@woodruffw woodruffw merged commit 08a568c into sigstore:main Feb 23, 2024
@JeanChristopheMorinPerso JeanChristopheMorinPerso deleted the allow_empty_inpts_with_release_artifacts branch February 23, 2024 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow inputs to be empty if release-signing-artifacts is true

2 participants