-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from lifeomic/no-more-travisci
Switch from travisci to github actions
- Loading branch information
Showing
4 changed files
with
72 additions
and
21 deletions.
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,19 @@ | ||
name: PR Branch Build and Test | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- master | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
- name: Test | ||
run: | | ||
yarn install | ||
yarn test |
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: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
registry-url: https://registry.npmjs.org | ||
- name: Test | ||
run: | | ||
yarn install | ||
yarn test | ||
- id: tagExistsAndVersion | ||
name: Check if tags exist in NPM and GIT | ||
run: | | ||
set +e | ||
packageName="$(node -p "require('./package').name")" | ||
packageVersion="$(node -p "require('./package').version")" | ||
packageNameAndVersion="${packageName}@${packageVersion}" | ||
npm view "${packageNameAndVersion}" dist.tarball | grep "${packageVersion}" > /dev/null | ||
npmTagExists="$([ "$?" = "0" ] && BOOL="true" || BOOL="false"; echo $BOOL)" | ||
set -e | ||
echo "::set-output name=npmTagExists::${npmTagExists}" | ||
echo "::set-output name=packageVersion::${packageVersion}" | ||
- name: Publish | ||
if: ${{ steps.tagExistsAndVersion.outputs.npmTagExists == 'false'}} | ||
run: npm publish --access public | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.LIFEOMIC_NPM_TOKEN}} | ||
- name: Create Release | ||
if: ${{ steps.tagExistsAndVersion.outputs.npmTagExists == 'false'}} | ||
id: create_release | ||
uses: actions/create-release@latest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: v${{ steps.tagExistsAndVersion.outputs.packageVersion }} | ||
release_name: v${{ steps.tagExistsAndVersion.outputs.packageVersion }} | ||
draft: false | ||
prerelease: false |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@lifeomic/alpha-cli", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Curl-like CLI for the Alpha client", | ||
"author": "LifeOmic <[email protected]>", | ||
"license": "MIT", | ||
|