Skip to content

Commit

Permalink
Merge two GitHub Actions into one
Browse files Browse the repository at this point in the history
Because GitHub doesn't trigger 2 workflows one based on the event of the other
  • Loading branch information
MunGell committed Jun 6, 2022
1 parent 13dfcbb commit 9c3c1b8
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 24 deletions.
20 changes: 0 additions & 20 deletions .github/workflows/npm.yml

This file was deleted.

29 changes: 25 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release Build
name: Release

on:
push:
Expand All @@ -7,11 +7,32 @@ on:

jobs:
build:

runs-on: ubuntu-latest

steps:
- name: Create Release
##################
# Checkout code
###################
- uses: actions/checkout@v3

##################
# Setup .npmrc file to publish to npm
# install dependencies, build and push to npm
###################
- uses: actions/setup-node@v3
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- run: |
npm install
npm run build
npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
##################
# Create GitHub Release
###################
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
Expand Down

0 comments on commit 9c3c1b8

Please sign in to comment.