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

Support signing releases #40

Open
1 of 5 tasks
taiki-e opened this issue Jan 14, 2023 · 7 comments
Open
1 of 5 tasks

Support signing releases #40

taiki-e opened this issue Jan 14, 2023 · 7 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@taiki-e
Copy link
Owner

taiki-e commented Jan 14, 2023

Things that appear to be the standard for each platform:

Other interesting things:

Refs:

@taiki-e taiki-e added the enhancement New feature or request label Jan 14, 2023
@taiki-e
Copy link
Owner Author

taiki-e commented Jan 14, 2023

Ok, here is experimental support for signing with PGP: main...pgp

Here is a workflow example:

- uses: taiki-e/upload-rust-binary-action@pgp
  with:
    bin: ...
    # Public key used for PGP signing.
    #
    # This must be an armored key or path to it.
    # For example, the file output by the following command:
    # 
    # > gpg --output <output-path> --armor --export <key-id>
    #
    # This key is not strictly needed for signing, but is used to verify that
    # signing was done correctly with the private key corresponding to this key.
    pgp_public_key: path/to/public-key.asc # or ${{ secrets.PGP_PUBLIC_KEY }}
    # Private key used for PGP signing.
    # 
    # This must be an armored key. Unlike pgp_public_key, path is not allowed.
    # For example, the contents of the file output by the following command:
    # 
    # > gpg --output <output-file> --armor --export-secret-key <key-id>
    # 
    # If you have already imported the private key, you do not need to specify this.
    pgp_private_key: ${{ secrets.PGP_PRIVATE_KEY }}
    # Passphrase of PGP private key. Default to empty string.
    pgp_passphrase: ${{ secrets.PGP_PASSPHRASE }}
    # Comma-separated list of file kinds to be signed with PGP.
    #
    # List can contains any of the followings:
    # - checksum: .<checksum> files
    # - asset: all assets to be uploaded except for .<checksum> files.
    #
    # Signing files inside the asset (e.g., rust binaries contained in the
    # archive) is not yet supported.
    pgp_sign_target: checksum,asset
    token: ${{ secrets.GITHUB_TOKEN }}

@sunshowers
Copy link
Contributor

sunshowers commented Oct 1, 2023

Binstall now has the ability to verify signatures generated by minisign: https://github.com/cargo-bins/cargo-binstall/blob/main/SIGNING.md

@taiki-e
Copy link
Owner Author

taiki-e commented Oct 5, 2023

Yeah, install-action also supports that. Its interface is simple, so could probably be implemented with only a few adjustments and simplification of the implementation for PGP.

@taiki-e
Copy link
Owner Author

taiki-e commented Dec 28, 2023

UPD: codesign on macOS was supported in 1.18.0 (#61) about a month ago.

@YarekTyshchenko
Copy link

I'm trying to add minisign to a repo that uses this action, and struggling: The action does both the compilation, and the upload, but I need to insert code signing steps in between.
Its probably possible to just add support for it directly by passing in an AGE_KEY_SECRET and encrypted minisign.key.age like the bininstall pipeline already does. (though it escapes me why not just store the key in cleartext in github secrets)

Any tips on how to proceed?

@taiki-e
Copy link
Owner Author

taiki-e commented Feb 21, 2024

I believe we can support minisign by tweaking my PGP patch above a bit, so that would be the best way to do it.

@matiaskorhonen
Copy link
Contributor

Sigstore support could now possibly be added using GitHub's own Artifact Attestations (currently in beta).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants