Skip to content

Commit

Permalink
Merge pull request #382 from georgejecook/chore/build-improvement2
Browse files Browse the repository at this point in the history
build: adds missin gpackage
  • Loading branch information
georgejecook authored May 20, 2023
2 parents dcbf53a + 7f39576 commit 8c31f2a
Show file tree
Hide file tree
Showing 3 changed files with 1,800 additions and 340 deletions.
66 changes: 14 additions & 52 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
name: build
on: [push, pull_request]

on:
push:
branches:
- master
- "release-*"
pull_request:
branches:
- master
- "release-*"
workflow_dispatch:
jobs:
ci:
runs-on: ${{ matrix.os }}
Expand All @@ -9,58 +17,12 @@ jobs:
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
os: [ubuntu-20.04, macos-13, windows-2019]
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@master
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "14.18.1"
- run: npm install --no-optional
node-version: "18.4.0"
- run: npm ci
- run: npx ropm copy
- run: npm run build
# - run: npm run lint
# - 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: "14.18.1"
- 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/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
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 --tag ${{env.DIST_TAG}}
Loading

0 comments on commit 8c31f2a

Please sign in to comment.