From 2295c9f84067f2e3cc7b5413a5ddf44eb9678e2f Mon Sep 17 00:00:00 2001 From: Tycho Bokdam Date: Wed, 1 Jul 2020 19:04:46 +0200 Subject: [PATCH] ci: Update versioning workflow and added test workflow --- .github/workflows/test.yml | 20 ++++++++++++++++++++ .github/workflows/versioning.yml | 2 +- src/test.js | 9 +++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/test.yml create mode 100644 src/test.js diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..b4218ab --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,20 @@ +name: 'Action to test the action locally with act' + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + path: "./conventional-changelog-action" + + - run: cd conventional-changelog-action && yarn --production + + - name: Generate changelog + id: changelog + uses: ./ + env: + ENV: 'test' + with: + github-token: ${{ secrets.github_token }} diff --git a/.github/workflows/versioning.yml b/.github/workflows/versioning.yml index 4c90338..5143980 100644 --- a/.github/workflows/versioning.yml +++ b/.github/workflows/versioning.yml @@ -14,4 +14,4 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.github_token }} with: - - publish_latest_tag: true + publish_latest_tag: 'true' diff --git a/src/test.js b/src/test.js new file mode 100644 index 0000000..702a3b9 --- /dev/null +++ b/src/test.js @@ -0,0 +1,9 @@ +const conventionalRecommendedBump = require('conventional-recommended-bump') + +async function run() { + conventionalRecommendedBump({ preset: 'angular', tagPrefix: 'v' }, async(error, recommendation, tag) => { + console.log(recommendation, tag) + }) +} + +run()