Merge pull request #2 from Travelport-Czech/add_tag_prefix

Add tag prefix
This commit is contained in:
Phil 2019-11-20 17:00:09 +01:00 committed by GitHub
commit 067cc37639
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 2 deletions

View File

@ -23,6 +23,8 @@ jobs:
node-version: 8.10.0
- name: "Automated Version Bump"
uses: "phips28/gh-action-bump-version@master"
with:
tag-prefix: ''
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "cat package.json"

View File

@ -25,7 +25,7 @@ COPY package*.json ./
RUN apt-get update
RUN apt-get -y install git
RUN npm ci
RUN npm ci --only=production
# Copy the rest of your action's code

View File

@ -6,3 +6,8 @@ runs:
branding:
icon: chevron-up
color: blue
inputs:
tag-prefix:
description: 'Prefix that is used for the git tag'
default: ''
required: false

View File

@ -45,6 +45,7 @@ Toolkit.run(async tools => {
['version', '--allow-same-version=true', '--git-tag-version=false', current])
console.log('current:', current, '/', 'version:', version)
newVersion = execSync(`npm version --git-tag-version=false ${version}`).toString().trim()
newVersion = `${process.env['INPUT_TAG-PREFIX']}${newVersion}`
console.log('new version:', newVersion)
await tools.runInWorkspace('git', ['commit', '-a', '-m', `"ci: ${commitMessage} ${newVersion}"`])

2
package-lock.json generated
View File

@ -6140,4 +6140,4 @@
}
}
}
}
}