sdfsdf #43
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
name: Generate and Publish SDK | |
on: | |
push: | |
branches: | |
- main | |
env: | |
NODE_VERSION: 18.x | |
jobs: | |
generate-sdk: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{env.NODE_VERSION}} | |
registry-url: "https://registry.npmjs.org/" | |
- name: Run docker-compose | |
run: | | |
cp CI/ESS/e2e/docker-compose.e2e.yaml docker-compose.yaml | |
docker compose pull | |
docker compose build --no-cache | |
docker compose up -d | |
- name: Wait for Backend | |
run: | | |
npm install -g wait-on | |
wait-on http://localhost:3000/api/v3/health --timeout 200000 | |
- name: Run SDK generation script | |
run: ./scripts/generate-sdk-local.sh | |
- name: Fix permissions for SDK directory | |
run: sudo chown -R $USER:$USER ./sdk | |
- name: Publish SDK to npm | |
run: | | |
npm install | |
npm run build | |
cd dist && npm publish --access public | |
working-directory: ./sdk | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |