Skip to content

v0.6.0-beta.1-1: Build with tsup #26

v0.6.0-beta.1-1: Build with tsup

v0.6.0-beta.1-1: Build with tsup #26

Workflow file for this run

name: πŸš€ Publish SDK
on:
push:
branches:
- main
jobs:
release:
name: πŸš€ Publish SDK
runs-on: ubuntu-latest
steps:
- name: πŸ›ŽοΈ Checkout
uses: actions/checkout@v3
- name: πŸ› οΈ Setup node
uses: actions/setup-node@v4
with:
node-version: latest
- name: 🎲 Choose backend version
id: backend_tag
run: |
if [ -f version-override.txt ]
then
echo "backend_tag=v`cat version-override.txt`" >> "$GITHUB_OUTPUT"
else
echo "backend_tag=v`cat package.json | jq -r .version`" >> "$GITHUB_OUTPUT"
fi
- name: ⬇️ Download OpenAPI schema
uses: robinraju/release-downloader@v1.8
with:
repository: ${{ github.repository_owner }}/backend
tag: ${{ steps.backend_tag.outputs.backend_tag }}
fileName: "openapi.yaml"
- name: πŸ—οΈ Generate SDK
run: |
./generate-sdk.sh openapi.yaml
- name: πŸ‘· npm install
run: |
npm install
- name: πŸ‘· npm build
run: |
npm run build
- name: πŸš€ Publish to NPM
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}