Skip to content

Commit

Permalink
Update build and release
Browse files Browse the repository at this point in the history
  • Loading branch information
matus12 committed Dec 3, 2024
1 parent 3caa1f8 commit eac1945
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 34 deletions.
7 changes: 1 addition & 6 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
# Users referenced in this file will automatically be requested as reviewers for PRs that modify the given paths.
# See https://help.github.com/articles/about-code-owners/

# Format: <Path> <Maintainer Team name from: https://kontent-ai.github.io/Guidelines-for-GitHub-permissions-in-Kontent-ai-organization>
# Example: * @kontent-ai/developer-relations
*
@JiriLojda @kontent-ai/developer-relations
36 changes: 18 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# For more information do to https://kontent-ai.github.io/ci-and-automation/ci-and-automation
name: Lint & Build

name: "Build" # Represents the name of the whole action.
on: # Specifies the section where we describe our build triggers.
push: # The action runs with push.
pull_request: # The action runs with a pull request.
schedule: # Specifies the section where we describe the schedule of running the action.
- cron: '0 18 * * 1' # The CRON expression describes when to run the action.
jobs: # Specifies the section where we describe our jobs.
Build: # Specific job section.
runs-on: ubuntu-latest # Describes the environment.
steps: # Specifies the section where we describe the job's steps.
- uses: actions/checkout@v3
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- name: Check code format
run: npm run format-check
on:
push:
branches: [main]
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js from .nvmrc file
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
- run: npm ci
- run: npm run format-check
- run: npm run build
22 changes: 13 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,21 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- name: Publish
run: npm publish --access public

- run: npm ci
- run: npm run build

- run: npm publish --access=public
if: ${{!github.event.release.prerelease}}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_API_KEY }}
- run: npm publish --tag prerelease
if: ${{github.event.release.prerelease}}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_API_KEY }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_API_KEY }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.0.0",
"description": "The Kontent.ai Custom App SDK enhances the integration of your custom app with the Kontent.ai platform.",
"license": "MIT",
"author": "Matus Backor",
"author": "Kontent.ai",
"keywords": ["Kontent.ai", "Kontent AI", "Kontent Custom App SDK JS"],
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down

0 comments on commit eac1945

Please sign in to comment.