Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
edit

GitHub Action

Jira Github Release Automation With Go

0.1.1 Pre-release

Jira Github Release Automation With Go

edit

Jira Github Release Automation With Go

Release Version In Jira

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Jira Github Release Automation With Go

uses: Geun-Oh/[email protected]

Learn more about this action in Geun-Oh/jira-github-release-automation-with-go

Choose a version

Jira-Github-Release-Automation-with-go

Github actions for Jira release automation.

Inputs

domain: Domain Name (check your jira url) - https://{domain}.atlassian.net project: Your project id releaseName: name of release you want auth-token: auth-token key create-next-version: create next version (option)

Auth Token

https://developer.atlassian.com/cloud/jira/platform/basic-auth-for-rest-apis/

  1. Generate an API token for Jira using your Atlassian Account.
  2. Build a string of the form useremail:api_token. ([email protected]:xxxxxxx)
  3. BASE64 encode the string.
  • Linux/Unix/MacOS:
echo -n [email protected]:api_token_string | base64
  • Windows 7 and later, using Microsoft Powershell:
$Text = ‘[email protected]:api_token_string’
$Bytes = [System.Text.Encoding]::UTF8.GetBytes($Text)
$EncodedText = [Convert]::ToBase64String($Bytes)
$EncodedText

Example Usage

name: Jira Release
on:
  push:
    branches: [main]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Extract version name
        run: echo "##[set-output name=version;]$(echo '${{ github.event.head_commit.message }}' | egrep -o '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}')"
        id: extract_version_name
      - name: Jira Github Release Automation
        id: release
        uses: Geun-Oh/[email protected]
        with:
          domain: "My domain"
          project: "My project"
          releaseName: "My release version name"
          auth-token: "My release token"
          create-next-version: false ## can be true
      - name: Print New Version ## when create-next-version option is true
        run: |
          echo ${{ steps.release.outputs.new-version }}

Ref

https://github.com/PRNDcompany/jira-release