Skip to content

Commit

Permalink
Merge pull request #168 from Cloud-Code-AI/add-ci-cd-for-create-app
Browse files Browse the repository at this point in the history
added new build process to publish packages
  • Loading branch information
sauravpanda authored Dec 3, 2024
2 parents 166ef94 + a3906ba commit df1d990
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
32 changes: 31 additions & 1 deletion .github/workflows/update-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,34 @@ jobs:
token: ${{ steps.generate_token.outputs.token }}
repository: ${{ github.repository_owner }}/akiradocs-template
event-type: update-template
client-payload: '{"ref": "${{ github.ref }}","sha": "${{ github.sha }}","version": "${{ steps.get-version.outputs.version }}"}'
client-payload: '{"ref": "${{ github.ref }}","sha": "${{ github.sha }}","version": "${{ steps.get-version.outputs.version }}"}'

publish-npm:
needs: trigger-update
if: needs.trigger-update.outputs.version_changed == 'true'
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write

steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'

- name: Install Dependencies
run: npm install

- name: Build Package
working-directory: packages/create-app
run: npm run build

- name: Publish to NPM
working-directory: packages/create-app
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion packages/create-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-akiradocs",
"version": "1.0.40",
"version": "1.0.41",
"description": "Create Akira Docs documentation sites with one command",
"main": "./dist/index.js",
"type": "module",
Expand Down

0 comments on commit df1d990

Please sign in to comment.