From 227104f9ac6f83e3f2a121da1e1a35ac6bf9cbf1 Mon Sep 17 00:00:00 2001 From: blas Date: Tue, 24 Mar 2026 14:56:48 +0100 Subject: [PATCH 1/7] chore: add config for workflow --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index ae06e6d..764edff 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ }, "scripts": { "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", "generate": "node dist/main.js", "generate:dev": "ts-node main.ts", From 1381aff08e3012c9a2ce5f7bc183c4f366142aa5 Mon Sep 17 00:00:00 2001 From: blas Date: Tue, 24 Mar 2026 15:08:50 +0100 Subject: [PATCH 2/7] chore: add config for workflow --- .gitea/workflows/publish.yml | 14 ++++++++++++++ package.json | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/publish.yml b/.gitea/workflows/publish.yml index 2a290ff..47d49b4 100644 --- a/.gitea/workflows/publish.yml +++ b/.gitea/workflows/publish.yml @@ -17,6 +17,20 @@ jobs: with: 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" + git config user.name "versioning" + git config user.email "versioning@blassanto.me" + git remote set-url origin https://x-token:${GITEA_TOKEN}@git.blassanto.me/blas/openapi-clean-arch-gen.git + git add package.json + git commit -m "chore: bump to version v${VERSION}" + git push origin HEAD:main + env: + GITEA_TOKEN: ${{ secrets.TOKEN }} + - name: Install dependencies run: npm ci diff --git a/package.json b/package.json index 764edff..278168c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@blas/openapi-clean-arch-generator", - "version": "1.0.0", + "version": "0.0.1", "description": "Generador de código Angular con Clean Architecture desde OpenAPI/Swagger", "main": "dist/main.js", "bin": { From 76fbadfc8fb60586e8a861f4af0f230ff9d8ea70 Mon Sep 17 00:00:00 2001 From: blas Date: Tue, 24 Mar 2026 15:27:49 +0100 Subject: [PATCH 3/7] chore: add config for workflow --- .gitea/workflows/publish.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/publish.yml b/.gitea/workflows/publish.yml index 47d49b4..3b25b0e 100644 --- a/.gitea/workflows/publish.yml +++ b/.gitea/workflows/publish.yml @@ -21,13 +21,15 @@ jobs: run: | VERSION=${GITHUB_REF_NAME#v} echo "Setting package version to $VERSION" + git fetch origin main + git checkout main npm pkg set version="$VERSION" git config user.name "versioning" git config user.email "versioning@blassanto.me" git remote set-url origin https://x-token:${GITEA_TOKEN}@git.blassanto.me/blas/openapi-clean-arch-gen.git git add package.json git commit -m "chore: bump to version v${VERSION}" - git push origin HEAD:main + git push origin main env: GITEA_TOKEN: ${{ secrets.TOKEN }} From 92283fdadbef7329652c3a4a34ab785183914c48 Mon Sep 17 00:00:00 2001 From: blas Date: Tue, 24 Mar 2026 15:38:49 +0100 Subject: [PATCH 4/7] chore: change versioning strategy --- .gitea/workflows/publish.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/publish.yml b/.gitea/workflows/publish.yml index 3b25b0e..82c3a26 100644 --- a/.gitea/workflows/publish.yml +++ b/.gitea/workflows/publish.yml @@ -21,15 +21,16 @@ jobs: run: | VERSION=${GITHUB_REF_NAME#v} echo "Setting package version to $VERSION" - git fetch origin main - git checkout main npm pkg set version="$VERSION" - git config user.name "versioning" - git config user.email "versioning@blassanto.me" - git remote set-url origin https://x-token:${GITEA_TOKEN}@git.blassanto.me/blas/openapi-clean-arch-gen.git - git add package.json - git commit -m "chore: bump to version v${VERSION}" - git push origin main + 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 }} From cf0ba60b91c2bace9696671294d3178a0473a4a5 Mon Sep 17 00:00:00 2001 From: actions Date: Tue, 24 Mar 2026 14:54:26 +0000 Subject: [PATCH 5/7] chore: bump to version v0.0.1-alpha --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 278168c..1c47007 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@blas/openapi-clean-arch-generator", - "version": "0.0.1", + "version": "0.0.1-alpha", "description": "Generador de código Angular con Clean Architecture desde OpenAPI/Swagger", "main": "dist/main.js", "bin": { From 87e59c49551a3b3ef59663214153278c7ab47341 Mon Sep 17 00:00:00 2001 From: blas Date: Tue, 24 Mar 2026 16:01:50 +0100 Subject: [PATCH 6/7] chore: update secrets --- .gitea/workflows/publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/publish.yml b/.gitea/workflows/publish.yml index 82c3a26..f256cd3 100644 --- a/.gitea/workflows/publish.yml +++ b/.gitea/workflows/publish.yml @@ -47,9 +47,9 @@ jobs: run: | echo "//git.blassanto.me/api/packages/blas/npm/:_authToken=${NODE_AUTH_TOKEN}" >> ~/.npmrc env: - NODE_AUTH_TOKEN: ${{ secrets.TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.PUBLISH_TOKEN }} - name: Publish to Gitea run: npm publish env: - NODE_AUTH_TOKEN: ${{ secrets.TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.PUBLISH_TOKEN }} From ac9d4ceb9947e32c383abdb378c988a224596686 Mon Sep 17 00:00:00 2001 From: actions Date: Tue, 24 Mar 2026 15:04:46 +0000 Subject: [PATCH 7/7] chore: bump to version v0.0.1-alpha