forked from sailshq/skipper
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
971308f
commit 8aac9bb
Showing
3 changed files
with
88 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
|
||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | ||
|
||
name: Node.js Unit Tests | ||
|
||
on: | ||
push: | ||
branches: [ devel ] | ||
pull_request: | ||
branches: [ devel ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [10.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Setup npmrc | ||
run: echo "" >> .npmrc && echo "//registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}}" >> .npmrc | ||
- run: npm ci | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
- run: npm run build --if-present |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Semantic Release | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [10.x] | ||
|
||
steps: | ||
- name: Git Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Setup npmrc | ||
run: echo "" >> .npmrc && echo "//registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}}" >> .npmrc | ||
|
||
- run: npm ci | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
- run: npm run build --if-present | ||
|
||
- name: Semantic Release | ||
uses: cycjimmy/semantic-release-action@v2 | ||
with: | ||
semantic_version: 17.1.1 | ||
id: semantic # Need an `id` for output variables | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
- name: Do something when a new release published | ||
if: steps.semantic.outputs.new_release_published == 'true' | ||
run: | | ||
echo ${{ steps.semantic.outputs.new_release_version }} | ||
echo ${{ steps.semantic.outputs.new_release_major_version }} | ||
echo ${{ steps.semantic.outputs.new_release_minor_version }} | ||
echo ${{ steps.semantic.outputs.new_release_patch_version }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters