Skip to content

Commit

Permalink
Merge pull request #381 from georgejecook/chore/build-improvement
Browse files Browse the repository at this point in the history
build: adds commitzen support and other build fixes
  • Loading branch information
georgejecook authored May 20, 2023
2 parents c614f30 + 70129ab commit dcbf53a
Show file tree
Hide file tree
Showing 5 changed files with 7,662 additions and 189 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
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"
COVERALLS_REPO_TOKEN: "RuXDcEBMUavqJgSdr5svlXWGDjrDEWFUI"
strategy:
matrix:
os: [ubuntu-18.04, macos-10.15]
Expand All @@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@master
- uses: actions/setup-node@master
with:
node-version: "10.19.0"
node-version: "14.18.1"
- run: npm install --no-optional
- run: npm ci
- run: npx ropm copy
Expand All @@ -33,11 +33,10 @@ jobs:
- uses: actions/checkout@master
- uses: actions/setup-node@master
with:
node-version: "10.19.0"
node-version: "14.18.1"
- run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ./.npmrc
- run: npm ci
- run: npm run build
- run: npm run lint
#create npm package
- run: npm pack

Expand All @@ -61,5 +60,7 @@ jobs:
with:
asset_paths: '["./*.tgz"]'

#If there's a dash followed by an alpha character, this is a prerelease and should be tagged "next". Otherwise tag as "latest"
- run: if [[ "${{ github.ref }}" =~ -[a-zA-Z] ]]; then echo "DIST_TAG=next" >> $GITHUB_ENV; else echo "DIST_TAG=latest" >> $GITHUB_ENV; fi
#upload to npm
- run: npm publish
- run: npm publish --tag ${{env.DIST_TAG}}
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: release
on:
workflow_dispatch:
jobs:
release:
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-20.04]
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Configure node
uses: actions/setup-node@v2
with:
node-version: "14.18.1"
- name: Run full CI
run: npm ci
- name: Build
run: npm run build
- name: Configure npm
run: npm config set //registry.npmjs.org/:_authToken=$NPM_TOKEN
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Run release
run: npm run release -ci --dry-run
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: End message
run: echo 'All done. Have a nice day!'

# - run: npm run publish-coverage
3 changes: 2 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"!*.zip",
"!**/*.zip"
],
"enableDebugProtocol": false
"enableDebugProtocol": true
},
{
"type": "brightscript",
Expand All @@ -49,6 +49,7 @@
"name": "OPEN TEST FILES",
"stopOnEntry": false,
"preLaunchTask": "build-tdd",
"enableDebugProtocol": true,
"envFile": "${workspaceFolder}/.vscode/.env",
"host": "${env:ROKU_DEV_TARGET}",
"password": "${env:ROKU_DEVPASSWORD}",
Expand Down
Loading

0 comments on commit dcbf53a

Please sign in to comment.