From 5480e462c510486fd94a6cbfe8e773128bb0087a Mon Sep 17 00:00:00 2001 From: Rimon Hanna Date: Tue, 30 Jun 2020 13:26:57 +0200 Subject: [PATCH] fixed bad reference to actions/core --- .actrc | 2 ++ .github/workflows/push.yml | 13 ++++++++++--- index.js | 3 +-- 3 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 .actrc diff --git a/.actrc b/.actrc new file mode 100644 index 000000000..139f30997 --- /dev/null +++ b/.actrc @@ -0,0 +1,2 @@ +-P ubuntu-latest=nektos/act-environments-ubuntu:18.04 +-v \ No newline at end of file diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 01d096cd9..b186604be 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -13,8 +13,6 @@ jobs: steps: - name: "Checkout source code" uses: "actions/checkout@v2" - with: - ref: ${{ github.ref }} - name: "cat package.json" run: cat ./package.json - name: "Setup Node.js" @@ -22,10 +20,19 @@ jobs: with: node-version: 12 - name: "Automated Version Bump" - uses: "phips28/gh-action-bump-version@master" + id: version_bump_and_create_tag + uses: "rimonhanna/gh-action-bump-version@master" with: tag-prefix: '' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: "cat package.json" run: cat ./package.json + + - name: Upload release notes + if: steps.version_bump_and_create_tag.outputs.TAG + uses: Roang-zero1/github-create-release-action@master + with: + created_tag: ${{ steps.version_bump_and_create_tag.outputs.TAG }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/index.js b/index.js index 4307a4c53..4faa52503 100644 --- a/index.js +++ b/index.js @@ -1,5 +1,4 @@ const { Toolkit } = require('actions-toolkit') -const { core } = require('actions/core'); const { execSync } = require('child_process') // Change working directory if user defined PACKAGEJSON_DIR @@ -72,6 +71,6 @@ Toolkit.run(async tools => { tools.log.fatal(e) tools.exit.failure('Failed to bump version') } - core.setOutput('TAG', newVersion); + Toolkit.setOutput('TAG', newVersion); tools.exit.success('Version bumped!') })