All Projects → Roang-zero1 → github-create-release-action

Roang-zero1 / github-create-release-action

Licence: MIT license
Create a GitHub release from a Tag

Programming Languages

shell
77523 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to github-create-release-action

qodana-action
⚙️ Scan your Java, Kotlin, PHP, Python, JavaScript, TypeScript projects at GitHub with Qodana
Stars: ✭ 112 (+239.39%)
Mutual labels:  continuous-integration, ci, actions
overview
Automate your workflows with GitHub actions for MATLAB.
Stars: ✭ 40 (+21.21%)
Mutual labels:  continuous-integration, ci, actions
xray-action
... a GitHub action to import test results into "Xray" - A complete Test Management tool for Jira.
Stars: ✭ 16 (-51.52%)
Mutual labels:  continuous-integration, ci, actions
generate-changelog
generates changelog from git based on jira tickets
Stars: ✭ 18 (-45.45%)
Mutual labels:  continuous-integration, ci, release-automation
github-act-runner
act as self-hosted runner
Stars: ✭ 68 (+106.06%)
Mutual labels:  continuous-integration, ci, actions
Android-CICD
This repo demonstrates how to work on CI/CD for Mobile Apps 📱 using Github Actions 💊 + Firebase Distribution 🎉
Stars: ✭ 37 (+12.12%)
Mutual labels:  continuous-integration, ci, actions
changed-files
Github action to retrieve all (added, copied, modified, deleted, renamed, type changed, unmerged, unknown) files and directories.
Stars: ✭ 733 (+2121.21%)
Mutual labels:  continuous-integration, ci, actions
makefiles
No description or website provided.
Stars: ✭ 23 (-30.3%)
Mutual labels:  continuous-integration, ci
www.go.cd
Github pages repo
Stars: ✭ 39 (+18.18%)
Mutual labels:  continuous-integration, ci
actions
A Collection of GitHub Actions
Stars: ✭ 91 (+175.76%)
Mutual labels:  ci, release-automation
landkid
Your friendly neighborhood async merging robot goat.
Stars: ✭ 80 (+142.42%)
Mutual labels:  continuous-integration, ci
build-plugin-template
Template repository to create new Netlify Build plugins.
Stars: ✭ 26 (-21.21%)
Mutual labels:  continuous-integration, ci
verify-changed-files
Github action to verify file changes that occur during the workflow execution.
Stars: ✭ 62 (+87.88%)
Mutual labels:  actions, release-automation
jenkinsapi
A Python API for accessing resources and configuring Hudson & Jenkins continuous-integration servers
Stars: ✭ 790 (+2293.94%)
Mutual labels:  continuous-integration, ci
escape-inventory
Storing and querying Escape releases
Stars: ✭ 16 (-51.52%)
Mutual labels:  continuous-integration, release-automation
developer-ci-benefits
Talk docs—includes CI (Continuous Integration) benefits, description, and setup tips 💡💪
Stars: ✭ 29 (-12.12%)
Mutual labels:  continuous-integration, ci
flagsmith-java-client
Java Client for Flagsmith. Ship features with confidence using feature flags and remote config. Host yourself or use our hosted version at https://www.flagsmith.com/
Stars: ✭ 16 (-51.52%)
Mutual labels:  continuous-integration, ci
phpci-installer
PHPCI Easy Installer for Laravel Homestead
Stars: ✭ 19 (-42.42%)
Mutual labels:  continuous-integration, ci
CI-Report-Converter
The tool converts different error reporting standards for deep compatibility with popular CI systems (TeamCity, IntelliJ IDEA, GitHub Actions, etc).
Stars: ✭ 17 (-48.48%)
Mutual labels:  ci, actions
branch-protection-bot
A bot tool to disable and re-enable "Include administrators" option in branch protection
Stars: ✭ 57 (+72.73%)
Mutual labels:  ci, actions

GitHub Action for Creating a Release on Tag push

Creates a new GitHub release whenever a tag is pushed.

Example Usage

The following basic workflow will create a release whenever any tag is pushed.

on: push
name: Release
jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - name: Create GitHub release
        uses: Roang-zero1/github-create-release-action@master
        with:
          version_regex: ^v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Limiting versions and creating pre-releases

If only certain tags should create releases or some releases should be created as pre-release you can set regular expression to achieve this. These regular expression are evaluated with GNU grep, so these regular expressions need to be compatible with it. Regular expressions containing \ need them to be escaped with \\.

  • version_regex Regular expression to verify that the version is in a correct format. Defaults to .* (accept everything).
  • prerelease_regex Any version matching this regular expression will be marked as pre-release. Disabled by default.
- name: Create GitHub release
  uses: Roang-zero1/github-create-release-action@master
  with:
    version_regex: ^v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+
    prerelease_regex: "^v2\\.[[:digit:]]+\\.[[:digit:]]+"
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Passing a tag to not rely on manual tag pushes

If you want to create a tag automatically and create the release in the same workflow you can set CREATED_TAG to achieve this. This allows you to create a fully automated release in one workflow file (workaround because one workflow/action can not trigger another workflow/action).
The example below uses K-Phoen/semver-release-action to create the tag whenever a pull request is closed, merged, and the head_ref starts with RC. After the tag is created it is passed to the create-release-action via the CREATED_TAG env variable using the output of the semver-release-action.

on:
  pull_request:
    types: closed

jobs:
  build:
    runs-on: ubuntu-latest
    if: github.event.pull_request.merged && startsWith(github.head_ref, 'RC')
    steps:
      - uses: actions/checkout@master
      - name: Tag and prepare release
        id: tag_and_prepare_release
        uses: K-Phoen/semver-release-action@master
        with:
          release_branch: master
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      - name: Upload release notes
        if: steps.tag_and_prepare_release.outputs.tag
        uses: Roang-zero1/github-create-release-action@master
        with:
          created_tag: ${{ steps.tag_and_prepare_release.outputs.tag }}
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Changelog parsing

This action makes it possible to extract the release description from a Markdown changelog.

By default the CHANGELOG.md file is searched for a ## (h2) heading matching the tag text.

If it is found the section is passed as body to the release API.

If for example we release the tag v1.0.0 with a CHANGELOG.md as follows:

# Changelog

## v1.0.0

Initial Release

Then the text Initial Release will be passed as body. Markdown restrictions for release bodies still apply.

Inputs

version_regex

Regular expression to verify that the version is in a correct format. Defaults to .* (accept everything).

prerelease_regex

Any version matching this regular expression will be marked as pre-release. Disabled by default.

create_draft

Create the releases as draft (true|false [default: false]). Existing will not be updated from released to draft.

update_existing

Controls whether an existing release should be updated with data from the latest push (true|false [default: false]).

created_tag

Allows to pass an already created tag.

release_title

Allows to pass a release title.

changelog_file

File that contains the Markdown formatted changelog. Defaults to CHANGELOG.md.

changelog_heading

Heading level at which the tag headings exist. Defaults to h2, this parses headings at the markdown level ##.

Secrets

  • GITHUB_TOKEN Provided by GitHub action, does not need to be set.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].