Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Fix npm publish step #75

Merged
merged 3 commits into from
Aug 22, 2022
Merged
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
20 changes: 15 additions & 5 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ on:
branches:
- main
- release/[0-9]+.[0-9]+.[0-9]+
tags:
- v[0-9]+.[0-9]+.[0-9]+

release:
types: [created]
jobs:
lib:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./lib
timeout-minutes: 5
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
Expand Down Expand Up @@ -44,6 +44,7 @@ jobs:
defaults:
run:
working-directory: ./cli
timeout-minutes: 5
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
Expand Down Expand Up @@ -77,6 +78,7 @@ jobs:
defaults:
run:
working-directory: ./sample-web-app
timeout-minutes: 5
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
Expand All @@ -100,6 +102,7 @@ jobs:
defaults:
run:
working-directory: .github/workflows
timeout-minutes: 5
steps:
- uses: actions/checkout@v2
- uses: mig4/setup-bats@v1
Expand Down Expand Up @@ -164,6 +167,7 @@ jobs:
defaults:
run:
working-directory: .github/workflows/roundtrip
timeout-minutes: 45
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
Expand Down Expand Up @@ -209,8 +213,9 @@ jobs:
tilt ci --file opentdf/quickstart/Tiltfile

deliver-ghp:
runs-on: ubuntu-latest
needs: [lib, cli, sample-web-app, scripts]
runs-on: ubuntu-latest
timeout-minutes: 5
# To publish from a release or feature branch, remove the ref == condition below
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
Expand Down Expand Up @@ -245,14 +250,19 @@ jobs:

deliver-npmjs:
runs-on: ubuntu-latest
timeout-minutes: 5
environment: npmjs
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
if: >-
(github.event_name == 'push' && github.ref == 'refs/heads/main')
|| (github.event_name == 'push' && startsWith(github.ref, 'refs/heads/release/'))
|| (github.event_name == 'release' && startsWith(github.ref, 'refs/tags/'))
needs: deliver-ghp
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- run: |-
if [[ ${{ github.ref }} = refs/heads/release/* ]]; then
scripts/check-version-is.sh "${GITHUB_REF##*release/}"
Expand Down