GitHub Action
Jira Github Release Automation With Go
0.1.3
Pre-release
Github actions for Jira release automation.
domain
: Domain Name (check your jira url) - https://{domain}.atlassian.net
project
: Your project id
releaseName
: Name of release
auth-token
: auth-token key
create-next-version
: create next version or not (optional)
https://developer.atlassian.com/cloud/jira/platform/basic-auth-for-rest-apis/
- Generate an API token for Jira using your Atlassian Account.
- Build a string of the form useremail:api_token. ([email protected]:xxxxxxx)
- 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
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 }}