Merge pull request #2 from Travelport-Czech/add_tag_prefix
Add tag prefix
This commit is contained in:
commit
067cc37639
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
1
index.js
1
index.js
|
@ -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}"`])
|
||||
|
||||
|
|
Loading…
Reference in New Issue