@ -27,8 +27,8 @@ on:
# Code block that is used as one liner.
# Code block that is used as one liner.
##!/bin/bash
##!/bin/bash
#version=$( git tag --list "{{ env.MAILU_VERSION }}.*" | tail -1 )
#version=$( git tag --list "{{ env.MAILU_VERSION }}.*" | tail -1 )
#root_version=${version :0:3 }
#root_version=${version %.* }
#patch_version=${version :4:4 }
#patch_version=${version ##*. }
#if [ "$patch_version" == "" ]
#if [ "$patch_version" == "" ]
#then
#then
# pinned_version={{ env.MAILU_VERSION }}.0
# pinned_version={{ env.MAILU_VERSION }}.0
@ -73,7 +73,7 @@ jobs:
if : ${{ env.BRANCH != 'testing' && env.BRANCH != 'staging' && env.BRANCH != 'master' }}
if : ${{ env.BRANCH != 'testing' && env.BRANCH != 'staging' && env.BRANCH != 'master' }}
shell : bash
shell : bash
run : |
run : |
version=$( git tag --list "${{ env.MAILU_VERSION }}.*" | tail -1 );root_version=${version :0:3};patch_version=${version:4:4 };if [ "$patch_version" == "" ]; then pinned_version=${{ env.MAILU_VERSION }}.0; else pinned_version=$root_version.$(expr $patch_version + 1); fi;echo "PINNED_MAILU_VERSION=$pinned_version" >> $GITHUB_ENV
version=$( git tag --list "${{ env.MAILU_VERSION }}.*" | tail -1 );root_version=${version %.*};patch_version=${version##*. };if [ "$patch_version" == "" ]; then pinned_version=${{ env.MAILU_VERSION }}.0; else pinned_version=$root_version.$(expr $patch_version + 1); fi;echo "PINNED_MAILU_VERSION=$pinned_version" >> $GITHUB_ENV
- name : Derive PINNED_MAILU_VERSION for staging
- name : Derive PINNED_MAILU_VERSION for staging
if : ${{ env.BRANCH == 'staging' }}
if : ${{ env.BRANCH == 'staging' }}
shell : bash
shell : bash
@ -149,7 +149,7 @@ jobs:
if : ${{ env.BRANCH != 'testing' && env.BRANCH != 'master' }}
if : ${{ env.BRANCH != 'testing' && env.BRANCH != 'master' }}
shell : bash
shell : bash
run : |
run : |
version=$( git tag --list "${{ env.MAILU_VERSION }}.*" | tail -1 );root_version=${version :0:3};patch_version=${version:4:4 };if [ "$patch_version" == "" ]; then pinned_version=${{ env.MAILU_VERSION }}.0; else pinned_version=$root_version.$(expr $patch_version + 1); fi;echo "PINNED_MAILU_VERSION=$pinned_version" >> $GITHUB_ENV
version=$( git tag --list "${{ env.MAILU_VERSION }}.*" | tail -1 );root_version=${version %.*};patch_version=${version##*. };if [ "$patch_version" == "" ]; then pinned_version=${{ env.MAILU_VERSION }}.0; else pinned_version=$root_version.$(expr $patch_version + 1); fi;echo "PINNED_MAILU_VERSION=$pinned_version" >> $GITHUB_ENV
- name : Derive PINNED_MAILU_VERSION for staging
- name : Derive PINNED_MAILU_VERSION for staging
if : ${{ env.BRANCH == 'staging' }}
if : ${{ env.BRANCH == 'staging' }}
shell : bash
shell : bash
@ -221,7 +221,7 @@ jobs:
if : ${{ env.BRANCH != 'testing' && env.BRANCH != 'master' }}
if : ${{ env.BRANCH != 'testing' && env.BRANCH != 'master' }}
shell : bash
shell : bash
run : |
run : |
version=$( git tag --list "${{ env.MAILU_VERSION }}.*" | tail -1 );root_version=${version :0:3};patch_version=${version:4:4 };if [ "$patch_version" == "" ]; then pinned_version=${{ env.MAILU_VERSION }}.0; else pinned_version=$root_version.$(expr $patch_version + 1); fi;echo "PINNED_MAILU_VERSION=$pinned_version" >> $GITHUB_ENV
version=$( git tag --list "${{ env.MAILU_VERSION }}.*" | tail -1 );root_version=${version %.*};patch_version=${version##*. };if [ "$patch_version" == "" ]; then pinned_version=${{ env.MAILU_VERSION }}.0; else pinned_version=$root_version.$(expr $patch_version + 1); fi;echo "PINNED_MAILU_VERSION=$pinned_version" >> $GITHUB_ENV
- name : Derive PINNED_MAILU_VERSION for staging
- name : Derive PINNED_MAILU_VERSION for staging
if : ${{ env.BRANCH == 'staging' }}
if : ${{ env.BRANCH == 'staging' }}
shell : bash
shell : bash
@ -293,7 +293,7 @@ jobs:
if : ${{ env.BRANCH != 'testing' && env.BRANCH != 'master' }}
if : ${{ env.BRANCH != 'testing' && env.BRANCH != 'master' }}
shell : bash
shell : bash
run : |
run : |
version=$( git tag --list "${{ env.MAILU_VERSION }}.*" | tail -1 );root_version=${version :0:3};patch_version=${version:4:4 };if [ "$patch_version" == "" ]; then pinned_version=${{ env.MAILU_VERSION }}.0; else pinned_version=$root_version.$(expr $patch_version + 1); fi;echo "PINNED_MAILU_VERSION=$pinned_version" >> $GITHUB_ENV
version=$( git tag --list "${{ env.MAILU_VERSION }}.*" | tail -1 );root_version=${version %.*};patch_version=${version##*. };if [ "$patch_version" == "" ]; then pinned_version=${{ env.MAILU_VERSION }}.0; else pinned_version=$root_version.$(expr $patch_version + 1); fi;echo "PINNED_MAILU_VERSION=$pinned_version" >> $GITHUB_ENV
- name : Derive PINNED_MAILU_VERSION for staging
- name : Derive PINNED_MAILU_VERSION for staging
if : ${{ env.BRANCH == 'staging' }}
if : ${{ env.BRANCH == 'staging' }}
shell : bash
shell : bash
@ -365,7 +365,7 @@ jobs:
if : ${{ env.BRANCH != 'testing' && env.BRANCH != 'master' }}
if : ${{ env.BRANCH != 'testing' && env.BRANCH != 'master' }}
shell : bash
shell : bash
run : |
run : |
version=$( git tag --list "${{ env.MAILU_VERSION }}.*" | tail -1 );root_version=${version :0:3};patch_version=${version:4:4 };if [ "$patch_version" == "" ]; then pinned_version=${{ env.MAILU_VERSION }}.0; else pinned_version=$root_version.$(expr $patch_version + 1); fi;echo "PINNED_MAILU_VERSION=$pinned_version" >> $GITHUB_ENV
version=$( git tag --list "${{ env.MAILU_VERSION }}.*" | tail -1 );root_version=${version %.*};patch_version=${version##*. };if [ "$patch_version" == "" ]; then pinned_version=${{ env.MAILU_VERSION }}.0; else pinned_version=$root_version.$(expr $patch_version + 1); fi;echo "PINNED_MAILU_VERSION=$pinned_version" >> $GITHUB_ENV
- name : Derive PINNED_MAILU_VERSION for staging
- name : Derive PINNED_MAILU_VERSION for staging
if : ${{ env.BRANCH == 'staging' }}
if : ${{ env.BRANCH == 'staging' }}
shell : bash
shell : bash
@ -437,7 +437,7 @@ jobs:
if : ${{ env.BRANCH != 'testing' && env.BRANCH != 'master' }}
if : ${{ env.BRANCH != 'testing' && env.BRANCH != 'master' }}
shell : bash
shell : bash
run : |
run : |
version=$( git tag --list "${{ env.MAILU_VERSION }}.*" | tail -1 );root_version=${version :0:3};patch_version=${version:4:4 };if [ "$patch_version" == "" ]; then pinned_version=${{ env.MAILU_VERSION }}.0; else pinned_version=$root_version.$(expr $patch_version + 1); fi;echo "PINNED_MAILU_VERSION=$pinned_version" >> $GITHUB_ENV
version=$( git tag --list "${{ env.MAILU_VERSION }}.*" | tail -1 );root_version=${version %.*};patch_version=${version##*. };if [ "$patch_version" == "" ]; then pinned_version=${{ env.MAILU_VERSION }}.0; else pinned_version=$root_version.$(expr $patch_version + 1); fi;echo "PINNED_MAILU_VERSION=$pinned_version" >> $GITHUB_ENV
- name : Derive PINNED_MAILU_VERSION for staging
- name : Derive PINNED_MAILU_VERSION for staging
if : ${{ env.BRANCH == 'staging' }}
if : ${{ env.BRANCH == 'staging' }}
shell : bash
shell : bash
@ -509,7 +509,7 @@ jobs:
if : ${{ env.BRANCH != 'testing' && env.BRANCH != 'master' }}
if : ${{ env.BRANCH != 'testing' && env.BRANCH != 'master' }}
shell : bash
shell : bash
run : |
run : |
version=$( git tag --list "${{ env.MAILU_VERSION }}.*" | tail -1 );root_version=${version :0:3};patch_version=${version:4:4 };if [ "$patch_version" == "" ]; then pinned_version=${{ env.MAILU_VERSION }}.0; else pinned_version=$root_version.$(expr $patch_version + 1); fi;echo "PINNED_MAILU_VERSION=$pinned_version" >> $GITHUB_ENV
version=$( git tag --list "${{ env.MAILU_VERSION }}.*" | tail -1 );root_version=${version %.*};patch_version=${version##*. };if [ "$patch_version" == "" ]; then pinned_version=${{ env.MAILU_VERSION }}.0; else pinned_version=$root_version.$(expr $patch_version + 1); fi;echo "PINNED_MAILU_VERSION=$pinned_version" >> $GITHUB_ENV
- name : Derive PINNED_MAILU_VERSION for staging
- name : Derive PINNED_MAILU_VERSION for staging
if : ${{ env.BRANCH == 'staging' }}
if : ${{ env.BRANCH == 'staging' }}
shell : bash
shell : bash
@ -587,7 +587,7 @@ jobs:
if : ${{ env.BRANCH != 'testing' && env.BRANCH != 'master' }}
if : ${{ env.BRANCH != 'testing' && env.BRANCH != 'master' }}
shell : bash
shell : bash
run : |
run : |
version=$( git tag --list "${{ env.MAILU_VERSION }}.*" | tail -1 );root_version=${version :0:3};patch_version=${version:4:4 };if [ "$patch_version" == "" ]; then pinned_version=${{ env.MAILU_VERSION }}.0; else pinned_version=$root_version.$(expr $patch_version + 1); fi;echo "PINNED_MAILU_VERSION=$pinned_version" >> $GITHUB_ENV
version=$( git tag --list "${{ env.MAILU_VERSION }}.*" | tail -1 );root_version=${version %.*};patch_version=${version##*. };if [ "$patch_version" == "" ]; then pinned_version=${{ env.MAILU_VERSION }}.0; else pinned_version=$root_version.$(expr $patch_version + 1); fi;echo "PINNED_MAILU_VERSION=$pinned_version" >> $GITHUB_ENV
- name : Derive PINNED_MAILU_VERSION for staging
- name : Derive PINNED_MAILU_VERSION for staging
if : ${{ env.BRANCH == 'staging' }}
if : ${{ env.BRANCH == 'staging' }}
shell : bash
shell : bash
@ -649,7 +649,7 @@ jobs:
if : ${{ env.BRANCH != 'testing' && env.BRANCH != 'staging' && env.BRANCH != 'master' }}
if : ${{ env.BRANCH != 'testing' && env.BRANCH != 'staging' && env.BRANCH != 'master' }}
shell : bash
shell : bash
run : |
run : |
version=$( git tag --list "${{ env.MAILU_VERSION }}.*" | tail -1 );root_version=${version :0:3};patch_version=${version:4:4 };if [ "$patch_version" == "" ]; then pinned_version=${{ env.MAILU_VERSION }}.0; else pinned_version=$root_version.$(expr $patch_version + 1); fi;echo "PINNED_MAILU_VERSION=$pinned_version" >> $GITHUB_ENV
version=$( git tag --list "${{ env.MAILU_VERSION }}.*" | tail -1 );root_version=${version %.*};patch_version=${version##*. };if [ "$patch_version" == "" ]; then pinned_version=${{ env.MAILU_VERSION }}.0; else pinned_version=$root_version.$(expr $patch_version + 1); fi;echo "PINNED_MAILU_VERSION=$pinned_version" >> $GITHUB_ENV
- name : Tag and create release
- name : Tag and create release
if : ${{ env.BRANCH != 'testing' && env.BRANCH != 'staging' && env.BRANCH != 'master' && env.PINNED_MAILU_VERSION != '' }}
if : ${{ env.BRANCH != 'testing' && env.BRANCH != 'staging' && env.BRANCH != 'master' && env.PINNED_MAILU_VERSION != '' }}
uses : ncipollo/release-action@v1
uses : ncipollo/release-action@v1