-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (36 loc) · 1.02 KB
/
api-go-action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Build and Publish API Go SDK
on:
workflow_call:
inputs:
publish:
type: boolean
required: false
default: false
description: "Publish the package, default is false"
jobs:
build_and_publish:
name: Build and Publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
token: ${{ secrets.GITHUB_TOKEN }}
persist-credentials: false
- name: Install NPM dependencies
run: npm ci
- name: Generate SDK
id: generate-sdk
run: ./api-go/build-sdk.ps1
shell: pwsh
- name: Build sample
run: ./api-go/build-samples.ps1
shell: pwsh
- name: Publish SDK
if: inputs.publish == true
run: ./api-go/publish-sdk.ps1
shell: pwsh
env:
PAT_GITHUB: ${{ secrets.PAT_GITHUB }}
PACKAGE_VERSION: ${{ steps.generate-sdk.outputs.trinsic-package-version }}
SDK_REPOSITORY_PATH: ${{ github.repository }}