Skip to content

Commit

Permalink
Merge branch 'master' into fix/no-error-on-default-props-match-prop-t…
Browse files Browse the repository at this point in the history
…ypes
  • Loading branch information
Rick van den Hof authored Sep 23, 2021
2 parents 488f1db + 86838e4 commit e7df026
Show file tree
Hide file tree
Showing 5 changed files with 1,255 additions and 1,372 deletions.
43 changes: 28 additions & 15 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,35 @@
name: Lint, test and build
on: push

env:
# Vault settings
VAULT_ADDR: https://vault-eyzrjbz27a-ew.a.run.app/
# To get the role id, change to the terraform production environment directory, and run:
# terraform state pull | jq '.resources[] | select(.type=="vault_approle_auth_backend_role" and .name=="github").instances[].attributes.role_id'
VAULT_ROLE_ID: 572856f8-3509-d6f8-7369-11468e595488

jobs:
build:
runs-on: ubuntu-latest
env:
CLOUDSMITH_TOKEN: ${{ secrets.CLOUDSMITH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- uses: actions/checkout@v2
- name: Npm cache
uses: actions/cache@v1
with:
path: ~/.npm
key: npm-${{ hashFiles('**/package.json') }}
- uses: actions/setup-node@v1
with:
node-version: 12.13.1
- run: npm install
- run: npm run build
- run: npm run lint
- name: Get common secrets
uses: hashicorp/[email protected]
id: secrets
with:
url: ${{ env.VAULT_ADDR }}
method: approle
roleId: ${{ env.VAULT_ROLE_ID }}
secretId: ${{ secrets.VAULT_SECRET_ID }}
secrets: secret/data/systems/common/npm token | NPM_TOKEN
- uses: actions/checkout@v2
- name: Npm cache
uses: actions/cache@v1
with:
path: ~/.npm
key: npm-${{ hashFiles('**/package-lock.json') }}
- uses: actions/setup-node@v1
with:
node-version: 12.13.1
- run: npm ci
- run: npm run build
- run: npm run lint
60 changes: 37 additions & 23 deletions .github/workflows/publish-beta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,46 @@ on:
types:
- published

env:
# Vault settings
VAULT_ADDR: https://vault-eyzrjbz27a-ew.a.run.app/
# To get the role id, change to the terraform production environment directory, and run:
# terraform state pull | jq '.resources[] | select(.type=="vault_approle_auth_backend_role" and .name=="github").instances[].attributes.role_id'
VAULT_ROLE_ID: 572856f8-3509-d6f8-7369-11468e595488

jobs:
publish:
name: Publish beta version
if: contains(github.ref, 'beta')
runs-on: ubuntu-latest
env:
CLOUDSMITH_TOKEN: ${{ secrets.CLOUDSMITH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- uses: actions/checkout@v2
- name: Npm cache
uses: actions/cache@v1
with:
path: ~/.npm
key: npm-${{ hashFiles('**/package.json') }}
- uses: actions/setup-node@v1
with:
node-version: 12.13.1
- run: npm install
- run: npm publish --tag beta
- uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
author_name: Stardust - Deploy
fields: repo,commit,message,author
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_USERNAME: Stardust
if: failure()
- name: Get common secrets
uses: hashicorp/[email protected]
id: secrets
with:
url: ${{ env.VAULT_ADDR }}
method: approle
roleId: ${{ env.VAULT_ROLE_ID }}
secretId: ${{ secrets.VAULT_SECRET_ID }}
secrets: |
secret/data/systems/common/npm token | NPM_TOKEN;
secret/data/systems/common/slack webhook | SLACK_WEBHOOK_URL
- uses: actions/checkout@v2
- name: Npm cache
uses: actions/cache@v1
with:
path: ~/.npm
key: npm-${{ hashFiles('**/package-lock.json') }}
- uses: actions/setup-node@v1
with:
node-version: 12.13.1
- run: npm ci
- run: npm publish --tag beta
- uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
author_name: Stardust - Deploy
fields: repo,commit,message,author
env:
SLACK_USERNAME: Stardust
if: failure()
60 changes: 37 additions & 23 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,46 @@ on:
types:
- published

env:
# Vault settings
VAULT_ADDR: https://vault-eyzrjbz27a-ew.a.run.app/
# To get the role id, change to the terraform production environment directory, and run:
# terraform state pull | jq '.resources[] | select(.type=="vault_approle_auth_backend_role" and .name=="github").instances[].attributes.role_id'
VAULT_ROLE_ID: 572856f8-3509-d6f8-7369-11468e595488

jobs:
publish:
name: Publish regular version
if: "!contains(github.ref, 'beta')"
runs-on: ubuntu-latest
env:
CLOUDSMITH_TOKEN: ${{ secrets.CLOUDSMITH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- uses: actions/checkout@v2
- name: Npm cache
uses: actions/cache@v1
with:
path: ~/.npm
key: npm-${{ hashFiles('**/package.json') }}
- uses: actions/setup-node@v1
with:
node-version: 12.13.1
- run: npm install
- run: npm publish
- uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
author_name: Stardust - Deploy
fields: repo,commit,message,author
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_USERNAME: Stardust
if: failure()
- name: Get common secrets
uses: hashicorp/[email protected]
id: secrets
with:
url: ${{ env.VAULT_ADDR }}
method: approle
roleId: ${{ env.VAULT_ROLE_ID }}
secretId: ${{ secrets.VAULT_SECRET_ID }}
secrets: |
secret/data/systems/common/npm token | NPM_TOKEN;
secret/data/systems/common/slack webhook | SLACK_WEBHOOK_URL
- uses: actions/checkout@v2
- name: Npm cache
uses: actions/cache@v1
with:
path: ~/.npm
key: npm-${{ hashFiles('**/package-lock.json') }}
- uses: actions/setup-node@v1
with:
node-version: 12.13.1
- run: npm ci
- run: npm publish
- uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
author_name: Stardust - Deploy
fields: repo,commit,message,author
env:
SLACK_USERNAME: Stardust
if: failure()
2 changes: 0 additions & 2 deletions .npmrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ access = public
git-tag-version = true
; Preformat the commit message used for tagging new versions
message = Release v%s
; Do not generate a package-lock.json
package-lock = false
registry = https://registry.npmjs.org/
unsafe-perm = true
; The NPM_TOKEN should be provided by the environment
Expand Down
Loading

0 comments on commit e7df026

Please sign in to comment.