Skip to content
This repository was archived by the owner on May 8, 2025. It is now read-only.

Volusion2Dev/action-tag-and-release

Repository files navigation

typescript-action status

Usage

- uses: actions/checkout@v2
  with:
    fetch-depth: 0 # this is necessary to get a list of commits

# ...

- uses: Volusion2Dev/action-tag-and-release@v1
  with:
    github_token: ${{ github.token }}
    environment: sandbox
    release_name: '[Release] - Sandbox'
    release_description: 'Optional description'

Inputs

github_token

Token for accessing the repository. Should just be ${{ github.token }} most of the time!

environment

The environment of the release; will be used as a prefix to the tag name. Ex. if you provide sandbox, a tag might be sandbox-20210720-01.

release_name

The name of the release in GitHub.

release_description

A line to put at the beginning of the release notes.

Development

This is based on the Typescript Action template

Code in Main

First, you'll need to have a reasonably modern version of node handy. This won't work with versions older than 9, for instance.

Install the dependencies

$ npm install

Build the typescript and package it for distribution

$ npm run build && npm run package

Run the tests ✔️

$ npm test

Publish to a distribution branch

Actions are run from GitHub repos so we will checkin the packed dist folder.

Then run ncc and push the results:

$ npm run package
$ git add dist
$ git commit -a -m "prod dependencies"
$ git push origin releases/v1

Note: We recommend using the --license option for ncc, which will create a license file for all of the production node modules used in your project.

Your action is now published! 🚀

See the versioning documentation

Usage:

After testing you can create a v1 branch to reference the stable and latest V1 action

About

Generate a GitHub Release from commits and current date

Resources

License

Stars

Watchers

Forks

Packages

No packages published