Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 0 additions & 41 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,44 +28,3 @@ jobs:
- run: npm run lint
- run: npm run test
- 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-latest
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@master
with:
node-version: "14.18.1"
architecture: 'x64' # fix for macos-latest
- 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"]'

#upload to npm
- run: npm publish
25 changes: 25 additions & 0 deletions .github/workflows/make-release-artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Make Release Artifacts

on:
pull_request:
types:
- reopened
- opened
- synchronize

jobs:
run:
if: startsWith( github.head_ref, 'release/')
uses: rokucommunity/workflows/.github/workflows/make-release-artifacts.yml@master
with:
branch: ${{ github.event.pull_request.head.ref }}
node-version: "14.18.1"
artifact-paths: "./*.tgz" # "*.vsix"
secrets: inherit

success-or-skip:
if: always()
needs: [run]
runs-on: ubuntu-latest
steps:
- run: if [ "${{ needs.run.result }}" = "failure" ]; then exit 1; fi
18 changes: 18 additions & 0 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Publish Release

on:
pull_request:
types:
- closed
paths:
- 'package.json'
- 'package-lock.json'

jobs:
run:
if: startsWith( github.head_ref, 'release/') && (github.event.pull_request.merged == true)
uses: rokucommunity/workflows/.github/workflows/publish-release.yml@master
with:
release-type: "npm" # "vsce"
ref: ${{ github.event.pull_request.merge_commit_sha }}
secrets: inherit