Giter Club home page Giter Club logo

actionrelease's Introduction

Action Release

Workflow Quality GitHub Release

This is a reusable workflow to tag and release a new version of a GitHub action or workflow. The workflow takes a semantic version as input. It validates the version, tags the repository on the main branch, and creates a GitHub Release.

The input version must be a 3-component semantic version: A.B.C. (The version may have a v prefix; the workflow accounts for that.) It then creates the tag vA.B.C. It also force creates the tags vA.B and vA at the same commit. This lets users of your workflow automatically get updates that they want.

Getting Started

To use this workflow, just set it in the uses key of a job in your project's workflow file. Here is an example workflow snippet that calls this workflow with a hard code 1.0.0 version:

jobs:
  release:
    name: New Release
    uses: brobeson/ActionRelease/.github/workflows/release.yaml@v1
    with:
      version: "1.0.0"

Manually Running Your Workflow

One method to pass a new version to this workflow, is for your calling workflow to use on.workflow_dispatch and require a version input.

on:
  workflow_dispatch:
    inputs:
      version:
        description: The new version.
        required: true
        type: string
jobs:
  release:
    name: New Release
    uses: brobeson/ActionRelease/.github/workflows/release.yaml@v1
    with:
      version: ${{inputs.version}}

Warning

The action release workflow will fail if you try to automatically run it when you create a tag in your repository. I'll address this in a future version of the action release workflow.

Inputs

Key Required Type Description
version yes string The semantic version of the new release.

Steps

The workflow runs the following steps.

  1. Verify the Version
    The version must be a 3-component semantic version. This step verifies the input. A v prefix, such as v1.0.0, is allowed; the workflow strips it out.
  2. Clone the Repository
    This step just clones the repository to the runner.
  3. Tag the Repository
    This step creates the local tags vA.B.C, vA.B, and vA on the main branch. The tags vA.B and vA are created with --force; if they already exist, they move to the new commit.
  4. Push the Tags
    This step force pushes the new tags to the origin remote.
  5. Create a Release
    This step creates a new GitHub Release at the new vA.B.C tag. The release title is A.B.C. For now, the release notes are empty.

Issue Tracking

GitHub Issues or Pull Requests by label GitHub Issues or Pull Requests by label GitHub Issues or Pull Requests by label GitHub milestone details

Report a bug | Request a new step | Update an existing step

actionrelease's People

Contributors

brobeson avatar

Watchers

 avatar

actionrelease's Issues

Update milestones

Version

1.0.1

New step

if "Next Version" milestone exists:
  if "Next Version" milestone has open issues:
    report error - all issues must be closed
  else if "Next Version" milestone has closed issues:
    rename "Next Version" milestone to "vA.B.C"
    close "vA.B.C" milestone
    create new "Next Version milestone

Marketplace Action

No response

Add issue templates

  • Bug report template
  • New step template
  • Update step template
  • Add links in the README

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.