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

Add outputs for the archive and checksum files #77

Merged
merged 8 commits into from
Jun 2, 2024

Conversation

matiaskorhonen
Copy link
Contributor

@matiaskorhonen matiaskorhonen commented May 8, 2024

Adds outputs from the action for the archive file name(s) and checksum file name(s).

This should enable using those in subsequent workflow steps, such as Artefact Attestations.

For example:

permissions:
  id-token: write
  contents: read
  attestations: write

#
# (the rest of the steps)
#

- uses: taiki-e/upload-rust-binary-action@v1
  id: upload-rust-binary-action
  with:
    dry-run: true
    bin: test-crate
    target: ${{ matrix.target }}
    build-tool: ${{ matrix.build_tool }}
    checksum: sha256,sha512,sha1,md5
    tar: all
    zip: all
    manifest-path: test-crate/Cargo.toml
    codesign: '-'

- name: Generate artifact attestation
  uses: actions/attest-build-provenance@v1
  with:
    subject-path: ${{ steps.upload-rust-binary-action.outputs.zip }}

# or

- name: Generate artifact attestation
  uses: actions/attest-build-provenance@v1
  with:
    subject-path: "${{ steps.upload-rust-binary-action.outputs.archive }}.*"

Hopefully I got most of the details right as I'm familiar with building GitHub Actions for the marketplace…

@matiaskorhonen matiaskorhonen changed the title Add outputs for the archives and checksum files Add outputs for the archive and checksum files May 9, 2024
@matiaskorhonen matiaskorhonen changed the title Add outputs for the archive and checksum files Add outputs for the archive name and checksum files May 14, 2024
@matiaskorhonen matiaskorhonen changed the title Add outputs for the archive name and checksum files Add outputs for the archive and checksum files May 14, 2024
@taiki-e
Copy link
Owner

taiki-e commented Jun 1, 2024

Thanks for the PR!

GITHUB_OUTPUT does not work on some self-hosted runners (taiki-e/create-gh-release-action#17), so could you add a workaround for that problem (something like taiki-e/create-gh-release-action@4466cb6)?

Otherwise LGTM.

Self-hosted runners may not set GITHUB_OUTPUT
Copy link
Owner

@taiki-e taiki-e left a comment

Choose a reason for hiding this comment

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

Thanks!

@taiki-e taiki-e merged commit 0ce34a6 into taiki-e:main Jun 2, 2024
14 checks passed
@matiaskorhonen matiaskorhonen deleted the add-github-actions-outputs branch June 2, 2024 11:35
@taiki-e
Copy link
Owner

taiki-e commented Jun 2, 2024

Published in 1.21.0.

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

Successfully merging this pull request may close these issues.

None yet

2 participants