Skip to content

Commit

Permalink
Publish
Browse files Browse the repository at this point in the history
  • Loading branch information
fewensa committed Jul 17, 2024
1 parent 2c1f35f commit b8badbd
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 3 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: 'Publish'

on:
push:
tags:
- "v*"
workflow_dispatch:


jobs:

publish-npm:
name: Publish NPM
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v4
with:
node-version: 20

- name: Install Deps
run: npm i

- name: Build template
run: npm run build:ts

- name: Publish ts
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
run: |
cd generated/typescript
npm run release
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Generate Helix conf",
"scripts": {
"codegen": "zx scripts/generate/index.mjs",
"build:ts": "npm run generate -- --language=ts && cd generated/typescript && npm i && npm run build",
"build:ts": "npm run codegen -- --language=ts && cd generated/typescript && npm i && npm run build",
"test:ts": "npm run build:ts && cd generated/typescript && npm run test"
},
"author": "",
Expand Down
9 changes: 7 additions & 2 deletions template/ts/files/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@
"version": "0.0.1",
"description": "Helix conf",
"main": "dist/src/index.js",
"publishConfig": {
"access": "public"
},
"scripts": {
"build": "rm -rf dist && tsc",
"test": "jest"
"test": "jest",
"release": "lerna publish --yes --no-verify-access"
},
"author": "HelixBridge",
"license": "MIT",
Expand All @@ -14,6 +18,7 @@
"jest": "^29.7.0",
"ts-jest": "^29.1.5",
"ts-node": "^10.9.2",
"typescript": "^5.5.3"
"typescript": "^5.5.3",
"lerna": "^8.1.6"
}
}

0 comments on commit b8badbd

Please sign in to comment.