Skip to content

build: update node and dependency versions #33

build: update node and dependency versions

build: update node and dependency versions #33

Workflow file for this run

# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Build OpenAPI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
#env:
# REGISTRY: ghcr.io
# IMAGE_NAME: ${{ github.repository }}
jobs:
build-push:
runs-on: ubuntu-latest
# permissions:
# contents: read
# packages: write
strategy:
matrix:
node-version: [20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm install @openapitools/openapi-generator-cli -g
- run: mkdir -p out
# - run: npm run build --if-present
##- docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli generate -i /local/openapi.yml -g typescript-axios -o /local/out/ --additional-properties=npmName=@jeni/vote-backend-ts-api,npmRepository=https://${CI_SERVER_HOST}/api/v4/projects/${CI_PROJECT_ID}/packages/npm/,npmVersion=0.0.1-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA},useSingleRequestParameter=true,supportsES6=true,modelPackage=true,apiPackage=true,disallowAdditionalPropertiesIfNotPresent=false
- run: npx @openapitools/openapi-generator-cli generate -i openapi.yaml -g typescript-axios -o out/ --additional-properties=npmName=@node-mail-broadcast/node-mailer-ts-api,npmVersion=0.0.1-${{ github.sha }},useSingleRequestParameter=false,supportsES6=true,modelPackage=true,apiPackage=true,disallowAdditionalPropertiesIfNotPresent=false
- run: cd out
# - run: cd out && echo //npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }} >> ~/.npmrc
- run: cd out && npm i
- run: cd out && npm run build
- uses: JS-DevTools/npm-publish@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
package: out/package.json
registry: https://npm.pkg.github.com
# with:
# token: ${{ secrets.GITHUB_TOKEN }}