Merge pull request #14 from phips28/checkout_v2

Checkout v2
This commit is contained in:
Phil 2020-04-03 13:09:38 +02:00 committed by GitHub
commit 4a9b9ee95a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 5 deletions

View File

@ -12,7 +12,7 @@ jobs:
steps: steps:
- name: "Checkout source code" - name: "Checkout source code"
uses: "actions/checkout@v1" uses: "actions/checkout@v2"
with: with:
ref: ${{ github.ref }} ref: ${{ github.ref }}
- name: "cat package.json" - name: "cat package.json"
@ -20,7 +20,7 @@ jobs:
- name: "Setup Node.js" - name: "Setup Node.js"
uses: "actions/setup-node@v1" uses: "actions/setup-node@v1"
with: with:
node-version: 8.10.0 node-version: 12
- name: "Automated Version Bump" - name: "Automated Version Bump"
uses: "phips28/gh-action-bump-version@master" uses: "phips28/gh-action-bump-version@master"
with: with:

View File

@ -7,6 +7,8 @@ It is meant to be used on every successful merge to master but
you'll need to configured that workflow yourself. You can look to the you'll need to configured that workflow yourself. You can look to the
[`.github/workflows/push.yml`](./.github/workflows/push.yml) file in this project as an example. [`.github/workflows/push.yml`](./.github/workflows/push.yml) file in this project as an example.
Make sure you use the `actions/checkout@v2` action!
### Workflow ### Workflow
* Based on the commit messages, increment the version from the lastest release. * Based on the commit messages, increment the version from the lastest release.

View File

@ -54,7 +54,6 @@ Toolkit.run(async tools => {
newVersion = execSync(`npm version --git-tag-version=false ${version}`).toString().trim() newVersion = execSync(`npm version --git-tag-version=false ${version}`).toString().trim()
newVersion = `${process.env['INPUT_TAG-PREFIX']}${newVersion}` newVersion = `${process.env['INPUT_TAG-PREFIX']}${newVersion}`
console.log('new version:', newVersion) console.log('new version:', newVersion)
await tools.runInWorkspace('git', ['commit', '-a', '-m', `ci: ${commitMessage} ${newVersion}`])
const remoteRepo = `https://${process.env.GITHUB_ACTOR}:${process.env.GITHUB_TOKEN}@github.com/${process.env.GITHUB_REPOSITORY}.git` const remoteRepo = `https://${process.env.GITHUB_ACTOR}:${process.env.GITHUB_TOKEN}@github.com/${process.env.GITHUB_REPOSITORY}.git`
// console.log(Buffer.from(remoteRepo).toString('base64')) // console.log(Buffer.from(remoteRepo).toString('base64'))

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "gh-action-bump-version", "name": "gh-action-bump-version",
"version": "6.0.2", "version": "6.0.5",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@ -1,6 +1,6 @@
{ {
"name": "gh-action-bump-version", "name": "gh-action-bump-version",
"version": "6.0.2", "version": "6.0.5",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/phips28/gh-action-bump-version.git" "url": "git+https://github.com/phips28/gh-action-bump-version.git"