Skip to content

Latest commit

 

History

History
60 lines (51 loc) · 1.78 KB

README.md

File metadata and controls

60 lines (51 loc) · 1.78 KB

can-create-release (for GitHub Actions)

Whether a new github release of the repository can be created.

Usage

If the tag name is already is use, an error will occur.

- uses: tshion/can-create-release@(version)
  with:
    # Repository name with owner. For example, tshion/can-create-release
    #
    # Default: ${{ github.repository }}
    repository: ''

    # Tag name you want to release
    tag: ''

    # Personal access token (PAT) used to fetch the repository. The PAT is configured
    # with the local git config, which enables your scripts to run authenticated git
    # commands. The post-job step removes the PAT.
    #
    #
    # We recommend using a service account with the least permissions necessary.
    # Also when generating a new PAT, select the least scopes necessary.
    #
    #
    # [Learn more about creating and using encrypted secrets](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets)
    #
    # Default: ${{ github.token }}
    token: ''

Scenarios

Please refer to the release page for the latest version.

Check in the same repository

- uses: tshion/can-create-release@(version)
  with:
    tag: (Tag name you want to release)

Check another repository

- uses: tshion/can-create-release@(version)
  with:
    repository: (Repository name with owner)
    tag: (Tag name you want to release)

Check another repository (private)

You need to provide PAT that can read another repository.

- uses: tshion/can-create-release@(version)
  with:
    repository: (Repository name with owner)
    tag: (Tag name you want to release)
    token: (Personal access token (PAT) used to fetch the repository)