8000 [feat] Upload Release Java artifacts to GitHub releases · Issue #1798 · aeron-io/aeron · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
[feat] Upload Release Java artifacts to GitHub releases #1798
Closed
@Lordfirespeed

Description

@Lordfirespeed

This would be helpful for e.g. getting the latest version of the Java Media driver for use with the Aeron.NET C# bindings for Aeron.

I am happy to contribute on this.

Usually such an arrangement entails giving Actions access to upload to releases, and then adding the relevant actions step.

Option 1 for permissions setup - less secure

Give actions 'write' permissions on the repository.
Image

Option 2 for permissions setup - more secure

A user with write access to the repository creates a 'fine-grained' Personal Access Token here:

  • Resource owner -> aeron-io
  • Expiration -> custom -> 1 year
  • Repository access -> selected repositories -> this repository
  • Repository permissions -> 'Contents' -> 'Read and Write'
Image

The generated PAT is added as a new 'repository secret' here
Image

Add step to Release workflow

- name: Upload artifacts to Release
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}  # if permissions option 1
    GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}  # if permissions option 2
  run: gh release upload ${{ TAG NAME EXPRESSION }} [file paths...]

TAG NAME EXPRESSION

  • For workflow runs triggered by release event, github.event.release.tag_name will expand to the tag name
  • For workflow runs triggered by push event with tags filter, github.ref_name should expand to the tag name ( I am not certain, but relatively confident )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0