commit
e49f1f790c
|
@ -8,7 +8,7 @@ jobs:
|
||||||
release:
|
release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- run: yarn --production
|
- run: yarn --production
|
||||||
- run: git add node_modules -f
|
- run: git add node_modules -f
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
"homepage": "https://github.com/TriPSs/conventional-changelog-action#readme",
|
"homepage": "https://github.com/TriPSs/conventional-changelog-action#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "1.2.3",
|
"@actions/core": "1.2.3",
|
||||||
"@actions/exec": "1.0.3",
|
"@actions/exec": "1.0.4",
|
||||||
"conventional-changelog": "3.1.18",
|
"conventional-changelog": "3.1.18",
|
||||||
"conventional-recommended-bump": "6.0.5"
|
"conventional-recommended-bump": "6.0.5"
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,12 +4,12 @@ const conventionalChangelog = require('conventional-changelog')
|
||||||
module.exports = (tagPrefix, preset, jsonPackage, fileName, releaseCount) => new Promise((resolve) => {
|
module.exports = (tagPrefix, preset, jsonPackage, fileName, releaseCount) => new Promise((resolve) => {
|
||||||
const changelogStream = conventionalChangelog({
|
const changelogStream = conventionalChangelog({
|
||||||
preset,
|
preset,
|
||||||
releaseCount: parseInt(releaseCount, 10)
|
releaseCount: parseInt(releaseCount, 10),
|
||||||
|
tagPrefix
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
version: jsonPackage.version,
|
version: jsonPackage.version,
|
||||||
currentTag: `${tagPrefix}${jsonPackage.version}`,
|
currentTag: `${tagPrefix}${jsonPackage.version}`,
|
||||||
tagPrefix,
|
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -84,6 +84,15 @@ module.exports = new (class Git {
|
||||||
this.exec(`commit -m "${message}" ${args.join(' ')}`)
|
this.exec(`commit -m "${message}" ${args.join(' ')}`)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pull the full history
|
||||||
|
*
|
||||||
|
* @return {Promise<>}
|
||||||
|
*/
|
||||||
|
pull = () => (
|
||||||
|
this.exec(`git pull --unshallow`)
|
||||||
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Push all changes
|
* Push all changes
|
||||||
*
|
*
|
||||||
|
|
|
@ -21,7 +21,10 @@ async function run() {
|
||||||
core.info(`Using "${tagPrefix}" as tag prefix`)
|
core.info(`Using "${tagPrefix}" as tag prefix`)
|
||||||
core.info(`Using "${outputFile}" as output file`)
|
core.info(`Using "${outputFile}" as output file`)
|
||||||
|
|
||||||
conventionalRecommendedBump({ preset }, async(error, recommendation) => {
|
core.info('Pull to make sure we have the full git history')
|
||||||
|
await git.pull()
|
||||||
|
|
||||||
|
conventionalRecommendedBump({ preset, tagPrefix }, async(error, recommendation) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
core.setFailed(error.message)
|
core.setFailed(error.message)
|
||||||
|
|
||||||
|
|
|
@ -7,10 +7,10 @@
|
||||||
resolved "https://registry.yarnpkg.com/@actions/core/-/core-1.2.3.tgz#e844b4fa0820e206075445079130868f95bfca95"
|
resolved "https://registry.yarnpkg.com/@actions/core/-/core-1.2.3.tgz#e844b4fa0820e206075445079130868f95bfca95"
|
||||||
integrity sha512-Wp4xnyokakM45Uuj4WLUxdsa8fJjKVl1fDTsPbTEcTcuu0Nb26IPQbOtjmnfaCPGcaoPOOqId8H9NapZ8gii4w==
|
integrity sha512-Wp4xnyokakM45Uuj4WLUxdsa8fJjKVl1fDTsPbTEcTcuu0Nb26IPQbOtjmnfaCPGcaoPOOqId8H9NapZ8gii4w==
|
||||||
|
|
||||||
"@actions/exec@1.0.3":
|
"@actions/exec@1.0.4":
|
||||||
version "1.0.3"
|
version "1.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/@actions/exec/-/exec-1.0.3.tgz#b967f8700d6ff011dcc91243b58bafc1bb9ab95f"
|
resolved "https://registry.yarnpkg.com/@actions/exec/-/exec-1.0.4.tgz#99d75310e62e59fc37d2ee6dcff6d4bffadd3a5d"
|
||||||
integrity sha512-TogJGnueOmM7ntCi0ASTUj4LapRRtDfj57Ja4IhPmg2fls28uVOPbAn8N+JifaOumN2UG3oEO/Ixek2A4NcYSA==
|
integrity sha512-4DPChWow9yc9W3WqEbUj8Nr86xkpyE29ZzWjXucHItclLbEW6jr80Zx4nqv18QL6KK65+cifiQZXvnqgTV6oHw==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@actions/io" "^1.0.1"
|
"@actions/io" "^1.0.1"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue