Skip to content

Commit

Permalink
[dsch] ghaction: checking ref
Browse files Browse the repository at this point in the history
  • Loading branch information
DScheglov committed Mar 18, 2021
1 parent 33e182e commit 96e2ebd
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,19 @@ jobs:
flag-name: node-${{ matrix.node }}
parallel: true

finish:
report-coverage:
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true
parallel-finished: true

publish:
needs: report-coverage
runs-on: ubuntu-latest
steps:
- name: Show ref
run: echo {{ github.ref }}
8 changes: 8 additions & 0 deletions version.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/* eslint-disable no-console */
const { version, name } = require('./package.json');

if (module.parent == null) {
console.log(`${name}@${version}`);
} else {
module.exports = { name, version };
}
3 changes: 3 additions & 0 deletions version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
PACKAGE_NAME=$(node ./version)
VERSION=$(npm view $PACKAGE_NAME version || echo "")
if [[ -n $VERSION ]]; then echo "Couldn't publish over existing version."; exit 1; fi

0 comments on commit 96e2ebd

Please sign in to comment.