Skip to content

Commit

Permalink
👷 Adjust scripts to publish on release.
Browse files Browse the repository at this point in the history
  • Loading branch information
jwir3 committed Aug 25, 2021
1 parent 627f888 commit ff8b06b
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 6 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,16 @@ on:
jobs:
# Set the job key. The key is displayed as the job name
# when a job name is not provided
build-and-publish:
build-and-test:
# Name the Job
name: Build and Publish Release
name: Build and Test
# Set the type of machine to run on
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.20.2]
node-version: [14.17.5]

steps:
# jq is needed for the package-bump-version script
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
Expand All @@ -32,7 +31,7 @@ jobs:
run: yarn install --production=false
env:
NODE_AUTH_TOKEN: ${{ secrets.PACKAGES_ACCESS_TOKEN }}
- name: Run Test Framework
run: yarn test
- name: Run Build Script
run: yarn build
- name: Run Test Framework
run: yarn test
37 changes: 37 additions & 0 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build and Publish Release

on:
release:
types: [released, edited]

jobs:
# Set the job key. The key is displayed as the job name
# when a job name is not provided
build-and-publish:
# Name the Job
name: Build and Publish Release
# Set the type of machine to run on
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.20.2]

steps:
# jq is needed for the package-bump-version script
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
registry-url: "https://npm.pkg.github.com"
env:
NODE_AUTH_TOKEN: ${{ secrets.PACKAGES_ACCESS_TOKEN }}
- name: Checkout Codebase
uses: actions/checkout@v2
- name: Install Dependencies
run: yarn install --production=false
env:
NODE_AUTH_TOKEN: ${{ secrets.PACKAGES_ACCESS_TOKEN }}
- name: Run Build Script
run: yarn build
- name: Run Test Framework
run: yarn test

0 comments on commit ff8b06b

Please sign in to comment.