Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@ jobs:
- name: 📡 Upload coverage para Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKE }}
fail_ci_if_error: true
verbose: true
verbose: true
45 changes: 45 additions & 0 deletions .github/workflows/release-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Release and Publish

on:
push:
branches:
- main # Executa apenas quando push for para a main

jobs:
release:
name: Version bump, changelog, release & publish
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Necessário para tags e histórico completo

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
registry-url: https://registry.npmjs.org/

- name: Install dependencies
run: npm ci

- name: Configure git for pushing tags
run: |
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_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git push origin main --follow-tags

- name: Publish package to npm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish --access public
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,8 @@ app.get('/private', protectRouteFromCookie, (req, res) => {

- [X] Suporte a múltiplos algoritmos JWT (HS512, RS256)
- [X] Suporte a cookies HTTP-only
- [ ] Middleware para roles e permissões
- [ ] Changelog automatizado + GitHub Release
- [X] Middleware para roles e permissões
- [X] Changelog automatizado + GitHub Release
- [ ] Exemplo completo com autenticação + refresh
- [ ] Middleware opcional para rotas públicas
- [ ] Compatibilidade com ESM (import/export)
Expand Down