Skip to content

Commit

Permalink
Bootstrap package publishing (#30)
Browse files Browse the repository at this point in the history
* Bootstrap package publishing

* Update SDK based on openapi.yaml changes

---------

Co-authored-by: Andrew Wylde <[email protected]>
Co-authored-by: team-devx <[email protected]>
  • Loading branch information
3 people authored Oct 3, 2023
1 parent 6287240 commit b65561c
Show file tree
Hide file tree
Showing 4 changed files with 1,621 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/check-pr-labels.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Check PR Labels

on:
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x

- name: Cache node modules
uses: actions/cache@v3
with:
path: node_modules
key: yarn-deps-${{ hashFiles('yarn.lock') }}
restore-keys: |
yarn-deps-${{ hashFiles('yarn.lock') }}
- name: Check if auto PR label is applied
if: github.event_name == 'pull_request'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
yarn install --frozen-lockfile
npx auto pr-check --url https://konghq.com --context auto/check-semver-label --pr ${{ github.event.pull_request.number }}
35 changes: 35 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Release

on: [push]

jobs:
release:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
steps:
- uses: actions/checkout@v3

- name: Prepare repository
run: git fetch --unshallow --tags

- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x

- name: Cache node modules
uses: actions/cache@v3
with:
path: node_modules
key: yarn-deps-${{ hashFiles('yarn.lock') }}
restore-keys: |
yarn-deps-${{ hashFiles('yarn.lock') }}
- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN_PRIVATE_PUBLISH }}
run: |
yarn install --frozen-lockfile
yarn build
npx auto shipit
8 changes: 8 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,17 @@
},
"repository": "[email protected]:Kong/sdk-portal-js.git",
"devDependencies": {
"auto": "^10.46.0",
"typescript": "5.0.2"
},
"dependencies": {
"axios": "0.27.2"
},
"license": "Apache-2.0",
"author": "kong-apiops <[email protected]>",
"auto": {
"plugins": [
"npm"
]
}
}
Loading

0 comments on commit b65561c

Please sign in to comment.