Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
8b4315a
chore(release): 1.0.4
Jul 24, 2025
40a7a83
Merge branch 'main' of https://github.com/devflow-modules/jwt-auth
Jul 24, 2025
178ca1c
Merge branch 'main' of https://github.com/devflow-modules/jwt-auth
Jul 24, 2025
35b7536
fix(release-publish): corrige push usando token no workflow para evit…
Jul 24, 2025
a5af92b
ci(release): automatiza versionamento, changelog e publicação no npm …
Jul 24, 2025
46923c6
Merge branch 'main' into fix/release-publish-npm-token
gustavomarques00 Jul 24, 2025
22161e6
fix(ci): corrige push no workflow de release usando token correto par…
Jul 24, 2025
ce7d4cd
Merge branch 'main' into fix/release-publish-npm-token
gustavomarques00 Jul 24, 2025
5e7beb0
fix(release): corrigir push no workflow com token npm
Jul 24, 2025
8a8228f
Merge branch 'main' into fix/release-publish-npm-token
gustavomarques00 Jul 24, 2025
e30f344
ci: add release create PR and publish workflows
Jul 24, 2025
5d8fd6c
Merge branch 'fix/release-publish-npm-token' of https://github.com/de…
Jul 24, 2025
1083a40
refactor: separar workflows em ci, release-create-pr e release-publis…
Jul 24, 2025
0946d85
Merge branch 'main' into fix/release-publish-npm-token
gustavomarques00 Jul 24, 2025
fe23a5d
fix(ci): desabilitar verificação GPG no upload para Codecov
Jul 24, 2025
2def245
Merge branch 'fix/release-publish-npm-token' of https://github.com/de…
Jul 24, 2025
0036764
fix(release): corrigir token npm para publicação e separar workflows …
Jul 24, 2025
d262016
Merge branch 'main' into fix/release-publish-npm-token
gustavomarques00 Jul 24, 2025
27aeeda
fix(workflow): ajusta release-publish.yml e release-create-pr.yml
Jul 24, 2025
d944950
Merge branch 'fix/release-publish-npm-token' of https://github.com/de…
Jul 24, 2025
c9bcc67
Merge branch 'main' into fix/release-publish-npm-token
gustavomarques00 Jul 24, 2025
afd6259
Ajuste no release pr
Jul 24, 2025
16406ae
Merge branches 'fix/release-publish-npm-token' and 'fix/release-publi…
Jul 24, 2025
1683f86
chore(release): 1.1.0
Jul 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 13 additions & 17 deletions .github/workflows/release-create-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,32 +33,28 @@ jobs:

- name: Get new version tag
id: get_version
run: echo "tag=$(node -p \"require('./package.json').version\")" >> $GITHUB_OUTPUT
run: |
echo "tag=$(node -p \"require('./package.json').version\")" >> $GITHUB_OUTPUT

- name: Create release branch and push
env:
GITHUB_PAT: ${{ secrets.TOKEN_GITHUB }}
RELEASE_BRANCH: release/v${{ steps.get_version.outputs.tag }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git checkout -b $RELEASE_BRANCH
git push origin $RELEASE_BRANCH
git checkout -b release/v${{ steps.get_version.outputs.tag }}
git push origin release/v${{ steps.get_version.outputs.tag }}

- name: Create Pull Request via API
env:
GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB }}
RELEASE_BRANCH: release/v${{ steps.get_version.outputs.tag }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
curl -X POST \
-H "Authorization: token $GITHUB_TOKEN" \
-H "Accept: application/vnd.github+json" \
-H "Content-Type: application/json" \
https://api.github.com/repos/${{ github.repository }}/pulls \
-d @- <<EOF
{
"title": "Release v${{ steps.get_version.outputs.tag }}",
"head": "$RELEASE_BRANCH",
"base": "main",
"body": "Release automática da versão v${{ steps.get_version.outputs.tag }}",
"reviewers": ["gustavomarques00"],
"assignees": ["gustavomarques00"]
}
EOF
-d "{\"title\": \"Release v${{ steps.get_version.outputs.tag }}\", \
\"head\": \"release/v${{ steps.get_version.outputs.tag }}\", \
\"base\": \"main\", \
\"body\": \"Release automática da versão v${{ steps.get_version.outputs.tag }}\", \
\"reviewers\": [\"gustavomarques00\"], \
\"assignees\": [\"gustavomarques00\"]}"
13 changes: 2 additions & 11 deletions .github/workflows/release-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on:
- main

jobs:
release:
name: Publish package to npm
publish:
if: startsWith(github.ref, 'refs/heads/release/')
runs-on: ubuntu-latest

steps:
Expand All @@ -30,15 +30,6 @@ jobs:
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"

- name: Run standard-version to bump version and generate changelog
run: npx standard-version

- name: Push version bump commit and tags
env:
GITHUB_PAT: ${{ secrets.TOKEN_GITHUB }}
run: |
git push https://x-access-token:${GITHUB_PAT}@github.com/${{ github.repository }} main --follow-tags

- name: Publish package to npm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [1.1.0](https://github.com/devflow-modules/jwt-auth/compare/v1.0.4...v1.1.0) (2025-07-24)


### Features

* **roles-middleware:** adiciona middleware protectWithRoles para proteção por roles ([#9](https://github.com/devflow-modules/jwt-auth/issues/9)) ([3694ac2](https://github.com/devflow-modules/jwt-auth/commit/3694ac26e8784d3b7e209620cfb38aeb942065c4))


### Bug Fixes

* **ci:** corrige push no workflow de release usando token correto para evitar erro 403 ([22161e6](https://github.com/devflow-modules/jwt-auth/commit/22161e6864d835dc710275d99a04586d8ccf7469))
* **ci:** desabilitar verificação GPG no upload para Codecov ([fe23a5d](https://github.com/devflow-modules/jwt-auth/commit/fe23a5d7d0c29b706d91759b4fa6f231936b13e1))
* **release-publish:** corrige push usando token no workflow para evitar erro 403 ([35b7536](https://github.com/devflow-modules/jwt-auth/commit/35b7536969c3366e79f7a807b979c5db1f6dd5b4))
* **release:** corrigir push no workflow com token npm ([5e7beb0](https://github.com/devflow-modules/jwt-auth/commit/5e7beb0ea49add7a362411dc7cd6c1fc94e8d327))
* **release:** corrigir token npm e separar workflows de release e PR ([#15](https://github.com/devflow-modules/jwt-auth/issues/15)) ([b785ee7](https://github.com/devflow-modules/jwt-auth/commit/b785ee7641caa201b855eeb8f85f16f08cfa910c))
* **release:** corrigir token npm para publicação e separar workflows em release-create-pr e release-publish ([0036764](https://github.com/devflow-modules/jwt-auth/commit/0036764089675c178cea1371e2dd390f29a35082))
* **workflow:** ajusta release-publish.yml e release-create-pr.yml ([27aeeda](https://github.com/devflow-modules/jwt-auth/commit/27aeeda71343cf8357e73053043dbbd0d6af42bc))

### [1.0.4](https://github.com/devflow-modules/jwt-auth/compare/v1.0.1...v1.0.4) (2025-07-24)


Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@devflow-modules/jwt-auth",
"version": "1.0.4",
"version": "1.1.0",
"description": "Autenticação JWT modular para Node.js com suporte a refresh token, cookies HTTP-only, bcrypt e middleware Express.",
"main": "./src/index.js",
"exports": {
Expand Down