-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
439 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Set Version And Publish | ||
|
||
inputs: | ||
version: | ||
required: true | ||
token: | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Set Version | ||
run: npm version "${{ inputs.version }}" --no-git-tag-version --no-commit-hooks | ||
|
||
- name: Publish | ||
run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ inputs.token }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Setup Runtime and Dependencies | ||
|
||
inputs: | ||
token: | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Setup node 18 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18' | ||
registry-url: https://npm.pkg.github.com/ | ||
scope: '@openphone' | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Cache dependencies | ||
id: cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ./node_modules | ||
key: modules-${{ hashFiles('package-lock.json') }} | ||
|
||
- name: Run CI | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: npm ci | ||
shell: bash | ||
env: | ||
NODE_AUTH_TOKEN: ${{inputs.token}} |
30 changes: 30 additions & 0 deletions
30
.github/workflows/build-and-publish-typescript-project-client.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Build Client | ||
|
||
on: | ||
workflow_call: | ||
secrets: | ||
token: | ||
description: 'The GitHub/npm token' | ||
required: true | ||
|
||
jobs: | ||
getver: | ||
uses: OpenPhone/gha/.github/workflows/getver.yml@v4 | ||
|
||
build-client: | ||
name: Build and Publish Client | ||
runs-on: ubuntu-22.04 | ||
needs: getver | ||
if: github.event_name == 'push' | ||
defaults: | ||
run: | ||
working-directory: ./client | ||
steps: | ||
- name: Build | ||
uses: OpenPhone/gha/.github/workflows/build-typescript-project-client.yml@v4 | ||
|
||
- name: Publish | ||
uses: OpenPhone/gha/.github/actions/publish@v4 | ||
with: | ||
token: ${{ inputs.token }} | ||
version: ${{ needs.getver.outputs.version }} |
30 changes: 30 additions & 0 deletions
30
.github/workflows/build-and-publish-typescript-project-types.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Build Application | ||
|
||
on: | ||
workflow_call: | ||
secrets: | ||
token: | ||
description: 'The GitHub/npm token' | ||
required: true | ||
|
||
jobs: | ||
getver: | ||
uses: OpenPhone/gha/.github/workflows/getver.yml@v4 | ||
|
||
build-types: | ||
name: Build and Publish Types | ||
runs-on: ubuntu-22.04 | ||
needs: getver | ||
if: github.event_name == 'push' | ||
defaults: | ||
run: | ||
working-directory: ./types | ||
steps: | ||
- name: Build | ||
uses: OpenPhone/gha/.github/workflows/build-typescript-project-types.yml@v4 | ||
|
||
- name: Publish | ||
uses: OpenPhone/gha/.github/actions/publish@v4 | ||
with: | ||
token: ${{ inputs.token }} | ||
version: ${{ needs.getver.outputs.version }} |
27 changes: 27 additions & 0 deletions
27
.github/workflows/build-and-publish-typescript-project.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Build Application | ||
|
||
on: | ||
workflow_call: | ||
secrets: | ||
token: | ||
description: 'The GitHub/npm token' | ||
required: true | ||
|
||
jobs: | ||
getver: | ||
uses: OpenPhone/gha/.github/workflows/getver.yml@v4 | ||
|
||
build: | ||
name: Build and Publish Types | ||
runs-on: ubuntu-22.04 | ||
needs: getver | ||
if: github.event_name == 'push' | ||
steps: | ||
- name: Build | ||
uses: OpenPhone/gha/.github/workflows/build-typescript-project.yml@v4 | ||
|
||
- name: Publish | ||
uses: OpenPhone/gha/.github/actions/publish@v4 | ||
with: | ||
token: ${{ inputs.token }} | ||
version: ${{ needs.getver.outputs.version }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Build Client | ||
|
||
on: | ||
workflow_call: | ||
secrets: | ||
token: | ||
description: 'The GitHub/npm token' | ||
required: true | ||
|
||
jobs: | ||
build-client: | ||
name: Build Client | ||
runs-on: ubuntu-22.04 | ||
defaults: | ||
run: | ||
working-directory: ./client | ||
steps: | ||
- name: Setup | ||
uses: OpenPhone/gha/.github/actions/setup@v4 | ||
with: | ||
token: ${{ secrets.token }} | ||
|
||
- name: Lint | ||
run: npm run lint | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: Test | ||
run: npm node . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Build Types | ||
|
||
on: | ||
workflow_call: | ||
secrets: | ||
token: | ||
description: 'The GitHub/npm token' | ||
required: true | ||
|
||
jobs: | ||
build-types: | ||
name: Build Types | ||
runs-on: ubuntu-22.04 | ||
defaults: | ||
run: | ||
working-directory: ./types | ||
steps: | ||
- name: Setup | ||
uses: OpenPhone/gha/.github/actions/setup@v4 | ||
with: | ||
token: ${{ secrets.token }} | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: Test | ||
run: npm node . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Build Application | ||
|
||
on: | ||
workflow_call: | ||
secrets: | ||
token: | ||
description: 'The GitHub/npm token' | ||
required: true | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Setup | ||
uses: OpenPhone/gha/.github/actions/setup@v4 | ||
with: | ||
token: ${{ secrets.token }} | ||
|
||
- name: Lint | ||
run: npm run lint | ||
|
||
- name: Typecheck | ||
run: npm run typecheck | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: Run | ||
run: node . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Get GitHub SHA | ||
|
||
on: | ||
workflow_call: | ||
outputs: | ||
sha: | ||
value: ${{ jobs.getsha.outputs.sha }} | ||
|
||
jobs: | ||
getsha: | ||
name: Get SHA | ||
runs-on: ubuntu-22.04 | ||
|
||
outputs: | ||
sha: ${{ steps.getsha.outputs.sha }} | ||
|
||
steps: | ||
- id: getsha | ||
shell: bash | ||
run: echo "sha=${GITHUB_SHA::8}" >> $GITHUB_OUTPUT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Get Version from Tag | ||
|
||
on: | ||
workflow_call: | ||
outputs: | ||
version: | ||
value: ${{ jobs.getver.outputs.version }} | ||
|
||
jobs: | ||
getver: | ||
name: Get Version | ||
runs-on: ubuntu-22.04 | ||
|
||
outputs: | ||
version: ${{ steps.vertag.outputs.version }} | ||
|
||
steps: | ||
- id: vertag | ||
shell: bash | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
run: echo "version=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_OUTPUT |
Oops, something went wrong.