Skip to content

nickatnight/releases-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Actions status Release Status

releases-action

A GitHub action to create a release from branch when pushing a new tag.

Other notable packages that did not satisfy my use case:

Usage 1

name: Tag it with defaults

on:
  push:
    tags:
      - "*"

jobs:
  create-release:
    permissions:
      contents: write
    runs-on: ubuntu-latest
    steps:
      - name: checkout
        uses: actions/checkout@v3
        with:
          fetch-depth: 0  # need this for all history for all branches and tags
      - name: Create Release
        id: create_release
        uses: nickatnight/releases-action@v5
        if: startsWith(github.ref, 'refs/tags/')
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

    outputs:
      ReleaseTag: ${{ steps.create_release.outputs.release_tag }}

  # pass in as env variable
  explore-essos:
    runs-on: ubuntu-latest
    needs: [create-release]
    env:
      RELEASE_TAG: ${{ needs.create-release.outputs.ReleaseTag }}
    steps:
      ...

Usage 2

name: Tag it with parameters

on:
  push:
    tags:
      - "*"

jobs:
  create-release:
    permissions:
      contents: write
    runs-on: ubuntu-latest
    steps:
      - name: checkout
        uses: actions/checkout@v3
        with:
          fetch-depth: 0
      - name: Create Release
        id: create_release
        uses: nickatnight/releases-action@v5
        if: startsWith(github.ref, 'refs/tags/')
        with:
          branch: "main"
          name: "Gryffindor Release"
          message: "Yer a wizard Harry"
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

    outputs:
      ReleaseTag: ${{ steps.create_release.outputs.release_tag }}

  # pass in as env variable
  conquer-muggles:
    runs-on: ubuntu-latest
    needs: [create-release]
    env:
      RELEASE_TAG: ${{ needs.create-release.outputs.ReleaseTag }}
    steps:
      ...

Supported Parameters

Parameter Description Default
branch Which branch do we want to release from? master
name Name of the release name of tag
message Body of the release autogenerated
draft Is this a draft? false
prerelease Is this a prerelease? false
tag Name of tag GITHUB_REF