Skip to content

Commit

Permalink
Create npm-publish-github-packages.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
crossmodaldebate authored Sep 17, 2024
1 parent d9c56e8 commit 79a0f9d
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/npm-publish-github-packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Publicar Pacote Node.js

on:
release:
types: [created]

jobs:
testar-e-construir:
runs-on: ubuntu-latest
steps:
- name: Checkout do Código
uses: actions/checkout@v4
- name: Configurar Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Instalar Dependências
run: npm ci
- name: Executar Testes
run: npm test

publicar-no-github-packages:
needs: testar-e-construir
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout do Código
uses: actions/checkout@v4
- name: Configurar Node.js para GitHub Packages
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://npm.pkg.github.com/
- name: Instalar Dependências
run: npm ci
- name: Publicar Pacote
run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 comments on commit 79a0f9d

Please sign in to comment.