diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 49d7734..45093a6 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -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" diff --git a/Dockerfile b/Dockerfile index 8c1b36e..01871d4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/action.yml b/action.yml index e84718c..9716c4b 100644 --- a/action.yml +++ b/action.yml @@ -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 diff --git a/index.js b/index.js index 4714e3f..2fb914f 100644 --- a/index.js +++ b/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}"`]) diff --git a/package-lock.json b/package-lock.json index f547855..3af2c3f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6140,4 +6140,4 @@ } } } -} +} \ No newline at end of file