Skip to content

Commit 1d561ba

Browse files
committed
fix pipe
1 parent fb1abda commit 1d561ba

File tree

2 files changed

+28
-5
lines changed

2 files changed

+28
-5
lines changed

.github/workflows/release.yml

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,17 @@ jobs:
1818
- name: 📥 Checkout
1919
uses: actions/checkout@v4
2020

21-
- name: 🟢 Node 12 (build)
21+
- name: 🟢 Node (build)
2222
uses: actions/setup-node@v4
2323
with:
2424
node-version: 20.19.6
2525

26+
- name: Debug OIDC Context
27+
run: |
28+
echo "Repository: $GITHUB_REPOSITORY"
29+
echo "Ref: $GITHUB_REF"
30+
echo "Workflow: $GITHUB_WORKFLOW"
31+
2632
- name: 📚 Install packages
2733
run: |
2834
mkdir -p dist/ion
@@ -32,14 +38,31 @@ jobs:
3238
- name: 🏗️ Build
3339
run: npm run build ion
3440

35-
- name: 🟢 Node 24 (publish)
41+
- name: 🟢 Node (publish)
3642
uses: actions/setup-node@v4
3743
with:
3844
node-version: 24.x
3945
registry-url: https://registry.npmjs.org
4046

47+
- name: 🏷️ Determine NPM Tag
48+
id: tag-logic
49+
run: |
50+
TARGET_BRANCH="${{ github.event.release.target_commitish }}"
51+
52+
if [[ "$TARGET_BRANCH" == "main" ]]; then
53+
echo "TAG=latest" >> $GITHUB_OUTPUT
54+
echo "Branch main detectada. Usando tag: latest"
55+
elif [[ "$TARGET_BRANCH" == "support/v19" ]]; then
56+
echo "TAG=v19-lts" >> $GITHUB_OUTPUT
57+
echo "Branch support/v19 detectada. Usando tag: v19-lts"
58+
else
59+
# Fallback de segurança para outras branches (ex: beta, RC)
60+
echo "TAG=next" >> $GITHUB_OUTPUT
61+
echo "Branch $TARGET_BRANCH detectada. Usando tag: next"
62+
fi
63+
4164
- name: 🚀 Publish
42-
run: npm publish --provenance --access public --tag v19-lts
65+
run: npm publish --provenance --access public --tag ${{ steps.tag-logic.outputs.TAG }}
4366
working-directory: dist/ion
4467
env:
4568
CI: true
@@ -49,7 +72,7 @@ jobs:
4972
API_KEY="${{ secrets.GOOGLE_CHAT_API_KEY }}"
5073
TOKEN="${{ secrets.GOOGLE_CHAT_TOKEN }}"
5174
SPACE_ID="${{ secrets.SPACE_ID }}"
52-
MESSAGE="Ion - Nova versão ${{ github.event.release.tag_name }} disponível!"
75+
MESSAGE="🚀 Ion - Nova versão *${{ github.event.release.tag_name }}* publicada com sucesso na tag NPM \`${{ steps.tag-logic.outputs.TAG }}\`!"
5376
5477
curl -X POST \
5578
-H "Content-Type: application/json; charset=UTF-8" \

projects/ion/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@brisanet/ion",
3-
"version": "19.2.0",
3+
"version": "19.2.1",
44
"repository": {
55
"type": "git",
66
"url": "git+https://github.com/Brisanet/ion.git"

0 commit comments

Comments
 (0)