Git Product home page Git Product logo

test-git-action's Introduction

Custom GitHub Action: Versioning and Tagging

This GitHub Action is designed to automate version updates and to push tags in your GitHub repository. It offers two operational modes: update-version (deafult) and push-tags.

Prerequisites

Before using this action, ensure your repository includes the following files at the root directory:

  • .release-please-manifest.json: Manages release versioning.
  • release-please-config.json: Configures the versioning behavior and release process.

Additionally, configure the necessary secrets (TOKEN_GITHUB) in your GitHub repository settings under Secrets.

Usage

Setup Secrets

Set up the TOKEN_GITHUB secret with a GitHub token that has appropriate permissions to push to the repository and manage pull requests.

Updating Version

This operation increments the project version and creates a pull request with the updated version. Configure it as follows:

- name: Update Version
  uses: cryptlex/[email protected]
  with:
    operation-mode: update-version          # Operation mode
    release-as: ${{ inputs.version_type }}  # Specify the version update type: 'patch', 'minor'
    git-user-name: github-actions           # Git username for commits
    git-user-email: [email protected]    # Git email for commits
    empty-commit: ${{ github.event.inputs.xyz }} # Create an empty commit if set to 'true'
    token: ${{ secrets.TOKEN_GITHUB }}      # GitHub token with appropriate permissions
    url: https://github.com/.....git        # Repository URL

Pushing tags

This operation pushes tag to the repository. Configure it as follows:

- name: Push Tag
  uses: cryptlex/[email protected]
  with:
    operation-mode: push-tags                 # Operation mode.
    git-user-name: github-actions             # Git username for commits
    git-user-email: [email protected] # Git email for commits
  • tagging-status: This output indicates whether the tag pushing operation was successful. It returns true for a successful operation and false otherwise. You can use this output to conditionally execute subsequent steps in your GitHub Actions workflow based on whether the tagging was successful.

test-git-action's People

Contributors

ahmad-kemsan avatar

Watchers

 avatar

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.