Skip to content

Commit

Permalink
add github build
Browse files Browse the repository at this point in the history
  • Loading branch information
georgejecook committed May 19, 2021
1 parent 9262847 commit f59e4d4
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 7 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: build
on: [push, pull_request]

jobs:
ci:
runs-on: ${{ matrix.os }}
env:
#hardcode the coveralls token...it's not overly important to protect, and github actions won't allow forks to work with coveralls otherwise
COVERALLS_REPO_TOKEN: "RuXDcEBMUavqJgSdr5svlXWGDjrDEWFUI"
strategy:
matrix:
os: [ubuntu-18.04, macos-10.15]
# os: [ubuntu-18.04, macos-10.15, windows-2019] - sorry windows.. maybe one day
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@master
with:
node-version: "10.19.0"
- run: npm ci
- run: npm run build
# - run: npm run publish-coverage
npm-release:
#only run this task if a tag starting with 'v' was used to trigger this (i.e. a tagged release)
if: startsWith(github.ref, 'refs/tags/v')
needs: ci
runs-on: ubuntu-18.04
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@master
with:
node-version: "10.19.0"
- run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ./.npmrc
- run: npm ci
- run: npm run build
#create npm package
- run: npm pack

#create GitHub release
- name: Create GitHub Release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: false #contains(github.ref, '-beta.') == true

#upload package to GitHub release
- name: Upload GitHub Release Assets
uses: alexellis/upload-assets@0.2.3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
asset_paths: '["./*.tgz"]'

#upload to npm
- run: npm publish
7 changes: 0 additions & 7 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"dist/**/!(manifest)*"
],
"devDependencies": {
"brighterscript": "^0.37.4",
"fs-extra": "^7.0.1",
"maestro-roku-bsc-plugin": "^0.3.2",
"roku-log-bsc-plugin": "^0.2.1",
Expand Down

0 comments on commit f59e4d4

Please sign in to comment.