Skip to content

Bump braces from 3.0.2 to 3.0.3 (#30) #29

Bump braces from 3.0.2 to 3.0.3 (#30)

Bump braces from 3.0.2 to 3.0.3 (#30) #29

Workflow file for this run

name: Main
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: "Checkout changes"
uses: actions/checkout@v2
- name: Set Node Version
id: nvm
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
- name: Setup NodeJS
uses: actions/setup-node@v1
with:
node-version: "${{ steps.nvm.outputs.NVMRC }}"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- name: "Install"
run: "yarn install"
- name: "Build"
run: "yarn build"
- name: "Test"
run: "yarn test"
- name: "Upload build artifacts"
uses: actions/upload-artifact@v2
with:
name: build-artifact
path: |
packages/*/dist
detect-publish-release:
runs-on: ubuntu-latest
outputs:
publish: ${{ steps.detect-publish.outputs.publish }}
steps:
- name: "Checkout changes"
uses: actions/checkout@v2
- name: "Detect publish"
id: "detect-publish"
run: |
result=`./scripts/detect_release.sh`
echo $result
echo ::set-output name=publish::$result
publish-canary:
runs-on: ubuntu-latest
needs: [build]
steps:
- name: "Checkout changes"
uses: actions/checkout@v2
- name: "Download build artifacts"
uses: actions/download-artifact@v2
with:
name: build-artifact
path: packages
- name: Set Node Version
id: nvm
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
- name: Setup NodeJS
uses: actions/setup-node@v1
with:
node-version: "${{ steps.nvm.outputs.NVMRC }}"
registry-url: https://registry.npmjs.org
scope: "@vertexvis"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- name: "Install"
run: "yarn install"
- name: "Publish Canary to NPM"
env:
NODE_AUTH_TOKEN: "${{ secrets.NPMJS_ACCESS_TOKEN }}"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPOSITORY: ${{ github.repository }}
run: |
git config user.name github-actions
git config user.email github-actions@github.com
./scripts/publish_canary.sh
publish-release:
runs-on: ubuntu-latest
needs: [build, detect-publish-release, publish-canary]
if: needs.detect-publish-release.outputs.publish == 1
steps:
- name: "Checkout changes"
uses: actions/checkout@v2
- name: "Download build artifacts"
uses: actions/download-artifact@v2
with:
name: build-artifact
path: packages
- name: Set Node Version
id: nvm
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
- name: Setup NodeJS
uses: actions/setup-node@v1
with:
node-version: "${{ steps.nvm.outputs.NVMRC }}"
registry-url: https://registry.npmjs.org
scope: "@vertexvis"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- name: "Install"
run: "yarn install"
- name: "Publish Release to NPM"
env:
NODE_AUTH_TOKEN: "${{ secrets.NPMJS_ACCESS_TOKEN }}"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPOSITORY: ${{ github.repository }}
run: "./scripts/publish_release.sh"