Merge branch 'main' into feat/review-imports
This commit is contained in:
@@ -17,6 +17,23 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: '20'
|
node-version: '20'
|
||||||
|
|
||||||
|
- name: Set version from tag
|
||||||
|
run: |
|
||||||
|
VERSION=${GITHUB_REF_NAME#v}
|
||||||
|
echo "Setting package version to $VERSION"
|
||||||
|
npm pkg set version="$VERSION"
|
||||||
|
SHA=$(curl -s -H "Authorization: token ${GITEA_TOKEN}" \
|
||||||
|
"https://git.blassanto.me/api/v1/repos/blas/openapi-clean-arch-gen/contents/package.json?ref=main" \
|
||||||
|
| node -e "let d='';process.stdin.on('data',c=>d+=c).on('end',()=>console.log(JSON.parse(d).sha))")
|
||||||
|
CONTENT=$(base64 -w 0 package.json)
|
||||||
|
curl -s -X PUT \
|
||||||
|
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
"https://git.blassanto.me/api/v1/repos/blas/openapi-clean-arch-gen/contents/package.json" \
|
||||||
|
-d "{\"message\":\"chore: bump to version v${VERSION}\",\"content\":\"${CONTENT}\",\"sha\":\"${SHA}\",\"branch\":\"main\"}"
|
||||||
|
env:
|
||||||
|
GITEA_TOKEN: ${{ secrets.TOKEN }}
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
||||||
@@ -30,9 +47,9 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo "//git.blassanto.me/api/packages/blas/npm/:_authToken=${NODE_AUTH_TOKEN}" >> ~/.npmrc
|
echo "//git.blassanto.me/api/packages/blas/npm/:_authToken=${NODE_AUTH_TOKEN}" >> ~/.npmrc
|
||||||
env:
|
env:
|
||||||
NODE_AUTH_TOKEN: ${{ secrets.TOKEN }}
|
NODE_AUTH_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
|
||||||
|
|
||||||
- name: Publish to Gitea
|
- name: Publish to Gitea
|
||||||
run: npm publish
|
run: npm publish
|
||||||
env:
|
env:
|
||||||
NODE_AUTH_TOKEN: ${{ secrets.TOKEN }}
|
NODE_AUTH_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@blas/openapi-clean-arch-generator",
|
"name": "@blas/openapi-clean-arch-generator",
|
||||||
"version": "1.0.0",
|
"version": "0.0.1-alpha",
|
||||||
"description": "Generador de código Angular con Clean Architecture desde OpenAPI/Swagger",
|
"description": "Generador de código Angular con Clean Architecture desde OpenAPI/Swagger",
|
||||||
"main": "dist/main.js",
|
"main": "dist/main.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
@@ -8,6 +8,7 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc && cp -r templates dist/",
|
"build": "tsc && cp -r templates dist/",
|
||||||
|
"postbuild": "node -e \"const fs=require('fs'); const f='dist/main.js'; const c=fs.readFileSync(f,'utf8'); if(!c.startsWith('#!/usr/bin/env node')) fs.writeFileSync(f,'#!/usr/bin/env node\\n'+c); fs.chmodSync(f, '755');\"",
|
||||||
"prepublishOnly": "npm run build",
|
"prepublishOnly": "npm run build",
|
||||||
"generate": "node dist/main.js",
|
"generate": "node dist/main.js",
|
||||||
"generate:dev": "ts-node main.ts",
|
"generate:dev": "ts-node main.ts",
|
||||||
|
|||||||
Reference in New Issue
Block a user