-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from adzerk/simonramzi/sc-48140/javascript-dec…
…ision-sdk-ignores-some-fields Added Skip Filters
- Loading branch information
Showing
8 changed files
with
522 additions
and
161 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,74 @@ | ||
name: Publish Decision Spec Packages | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
env: | ||
WORKINGDIRECTORY_DECISION: build/ts/decision | ||
|
||
jobs: | ||
typescript: | ||
name: Publish Typescript Package | ||
runs-on: ubuntu-latest | ||
steps: | ||
- id: a9c19221-2149-41f2-91d7-e8411bf3ecc5 | ||
name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
- id: ba48f425-ccc1-4288-8ff6-4a1812e83224 | ||
name: Setup NodeJS | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
|
||
- id: e75378b3-35d5-4f84-a871-d47e518f2d04 | ||
name: Install Dependencies | ||
run: npm clean-install | ||
|
||
- id: ced9f2a9-8b4a-4082-a0d1-7791c847d632 | ||
name: Build Typescript Components from Decision Spec | ||
run: npm run build-decision-typescript | ||
|
||
- id: db7f8f85-c695-48a1-acfc-a2898987dfa3 | ||
name: Copy Package Files into Working Directory | ||
run: cp decision/package-config/npm/* ${WORKINGDIRECTORY_DECISION} | ||
|
||
- id: db6068b8-f5ed-4968-847e-b642595243fd | ||
name: Install Typescript Compiler Globally | ||
run: npm install --global typescript | ||
|
||
- id: e842d27d-141c-47f2-b64c-2c5702984edf | ||
name: Compile Package | ||
working-directory: ${WORKINGDIRECTORY_DECISION} | ||
run: tsc --outDir dist --declaration *.ts | ||
|
||
- id: edd89b5d-54fa-4951-8206-54b1cef91968 | ||
name: Configure Project-Level .npmrc File | ||
working-directory: ${WORKINGDIRECTORY_DECISION} | ||
run: npm config set --location=project @adzerk:registry=https://'${NPM_REGISTRY}' //'${NPM_REGISTRY}'/:_authToken='${NPM_SECRET}' | ||
|
||
- id: c8734e87-1bb8-4340-9ab2-fd5cabb1ac6b | ||
name: Update Version package.json to Released Version | ||
working-directory: ${WORKINGDIRECTORY_DECISION} | ||
run: npm pkg set "version"="${GITHUB_REF_NAME}" | ||
|
||
- id: b5abe142-c11f-4951-8809-4bc118b4027d | ||
name: Publish Package to NPM | ||
env: | ||
NPM_REGISTRY: registry.npmjs.org | ||
NPM_SECRET: ${{ secrets.NPM_TOKEN }} | ||
working-directory: ${WORKINGDIRECTORY_DECISION} | ||
run: | | ||
echo "Publishing tag ${GITHUB_REF_NAME} to ${NPM_REGISTRY}." | ||
npm publish --dry-run | ||
- id: c3c47fb3-2620-4dd1-898b-e867303278ea | ||
name: Publish Package to GitHub Packages | ||
env: | ||
NPM_REGISTRY: npm.pkg.github.com | ||
NPM_SECRET: ${{ secrets.GITHUB_TOKEN }} | ||
working-directory: ${WORKINGDIRECTORY_DECISION} | ||
run: | | ||
echo "Publishing tag ${GITHUB_REF_NAME} to ${NPM_REGISTRY}." | ||
npm publish --dry-run |
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,22 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [Unreleased] | ||
|
||
### Changed | ||
|
||
- Updated `@openapitools/openapi-generator-cli` to latest. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake). | ||
- Updated `generator-cli` version. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake). | ||
|
||
### Added | ||
|
||
- This `CHANGELOG.md` file to track changes. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake). | ||
- Schema definition for `SkipFilters` in `decision/openapi-3.yaml`. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake). | ||
- `SkipFilters` parameter to Placement object in non-breaking, optional manner. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake). | ||
- Base information to project `package.json`. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake). | ||
- NPM build scripts to `package.json` for both the decision and management specifications. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake). | ||
- CI/CD workflow that allows for Typescript implementation of the api spec to be deployed as a package to a npm registry (currently a dry-run). By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake). |
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
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 @@ | ||
# Decision API Spec for Typescript |
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": "@adzerk/api-decision-js", | ||
"description": "Decision API specification.", | ||
"main": "dist/index.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/adzerk/adzerk-api-specification.git" | ||
}, | ||
"files": [ | ||
"dist" | ||
], | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"keywords": [], | ||
"author": "", | ||
"license": "Apache-2.0" | ||
} |
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
Oops, something went wrong.