All Projects → actions-ecosystem → action-release-label

actions-ecosystem / action-release-label

Licence: Apache-2.0 license
🏷️ GitHub Action to output a semver update level from a pull request release label

Programming Languages

shell
77523 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to action-release-label

dependent-issues
📦 A GitHub Action for marking issues as dependent on another
Stars: ✭ 83 (+102.44%)
Mutual labels:  label, actions
verify-changed-files
Github action to verify file changes that occur during the workflow execution.
Stars: ✭ 62 (+51.22%)
Mutual labels:  actions
Dam
Delphi and Lazarus Message Dialogs with Formatted Text
Stars: ✭ 85 (+107.32%)
Mutual labels:  label
clojure-dependency-update-action
A simple GitHub Actions job to create Pull Requests for outdated dependencies in clojure projects
Stars: ✭ 37 (-9.76%)
Mutual labels:  actions
setup-hashlink
A github action to install and setup Hashlink
Stars: ✭ 13 (-68.29%)
Mutual labels:  actions
k8s-create-secret
GitHub Action to create Kubernetes cluster secrets
Stars: ✭ 24 (-41.46%)
Mutual labels:  actions
setup-jdk
(DEPRECATED) Set up your GitHub Actions workflow with a specific version of AdoptOpenJDK
Stars: ✭ 32 (-21.95%)
Mutual labels:  actions
labeler
GitHub Action to assign labels to PRs based on configurable conditions
Stars: ✭ 47 (+14.63%)
Mutual labels:  actions
add-an-issue-reference-action
A GitHub Action for adding a related issue reference to a pull request.
Stars: ✭ 19 (-53.66%)
Mutual labels:  actions
setup-sp
This action sets-up, cache and adds sourcemod scripting directory to the path
Stars: ✭ 30 (-26.83%)
Mutual labels:  actions
branch-names
Github action to retrieve branch or tag names with support for all events.
Stars: ✭ 99 (+141.46%)
Mutual labels:  actions
mc-publish
GitHub Action that helps you publish your Minecraft mods
Stars: ✭ 76 (+85.37%)
Mutual labels:  actions
clang-tidy-review
Create a pull request review based on clang-tidy warnings
Stars: ✭ 33 (-19.51%)
Mutual labels:  actions
unity-test-runner
Run tests for any Unity project
Stars: ✭ 134 (+226.83%)
Mutual labels:  actions
danger-action
Execute danger action for GitHub Actions.
Stars: ✭ 24 (-41.46%)
Mutual labels:  actions
Real Time Social Media Mining
DevOps pipeline for Real Time Social/Web Mining
Stars: ✭ 22 (-46.34%)
Mutual labels:  actions
node-typescript-starter
A starter project to easily create new NodeJS applications with TypeScript.
Stars: ✭ 42 (+2.44%)
Mutual labels:  actions
standard-action
Github Action to lint with `standard` and friends
Stars: ✭ 15 (-63.41%)
Mutual labels:  actions
deployer-php-action
Deploy PHP projects using Deployer from Github Actions
Stars: ✭ 57 (+39.02%)
Mutual labels:  actions
html5validator-action
GitHub Action that checks HTML5 syntax.
Stars: ✭ 27 (-34.15%)
Mutual labels:  actions

Action Release Label

actions-workflow-lint release license

screenshot

This is a GitHub Action to output a semver update level major, minor, patch from a pull request release label.

For example, if a pull request has the label release/minor, this action outputs minor as level.

It would be more useful to use this with other GitHub Actions' outputs. It's recommended to use this with actions-ecosystem/action-bump-semver and actions-ecosystem/action-push-tag.

This action supports pull_request and push events.

Prerequisites

It's necessary to create labels with the inputs.label_prefix prefix and the major, minor, patch suffix before getting started with this action.

By default, they're release/major, release/minor, and release/patch.

Inputs

NAME DESCRIPTION TYPE REQUIRED DEFAULT
label_prefix A prefix for labels that indicate semver level {major, minor, patch}. string false release/
labels The list of labels for the pull request. Separated with line breaks if there're multiple labels. Required for push events, not for pull_request events. string false N/A

It would be easy to prepare inputs.labels with actions-ecosystem/action-get-merged-pull-request.

Outputs

NAME DESCRIPTION TYPE
level A semver update level {major, minor, patch}. string

Example

Simple

name: Push a new tag with Pull Request

on:
  pull_request:
    types: [closed]

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2

      - uses: actions-ecosystem/action-release-label@v1
        id: release-label
        if: ${{ github.event.pull_request.merged == true }}

      - uses: actions-ecosystem/action-get-latest-tag@v1
        id: get-latest-tag
        if: ${{ steps.release-label.outputs.level != null }}

      - uses: actions-ecosystem/action-bump-semver@v1
        id: bump-semver
        if: ${{ steps.release-label.outputs.level != null }}
        with:
          current_version: ${{ steps.get-latest-tag.outputs.tag }}
          level: ${{ steps.release-label.outputs.level }}

      - uses: actions-ecosystem/action-push-tag@v1
        if: ${{ steps.release-label.outputs.level != null }}
        with:
          tag: ${{ steps.bump-semver.outputs.new_version }}
          message: '${{ steps.bump-semver.outputs.new_version }}: PR #${{ github.event.pull_request.number }} ${{ github.event.pull_request.title }}'

Note

This action is inspired by haya14busa/action-bumpr.

License

Copyright 2020 The Actions Ecosystem Authors.

Action Release Label is released under the Apache License 2.0.

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].