Skip to content

Commit

Permalink
add cicd
Browse files Browse the repository at this point in the history
  • Loading branch information
murilo-cunha committed Jul 5, 2023
1 parent 5eeda80 commit 550405f
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Publish Package to npmjs
on:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14
registry-url: 'https://registry.npmjs.org'
- run: yarn version --new-version patch
- run: yarn
- run: yarn publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
21 changes: 21 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Publish Package to npmjs
on:
push:
tags: ['*']
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: echo "TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Create release
uses: actions/github-script@v5
with:
github-token: ${{ github.token }}
script: |
github.rest.repos.createRelease({
owner: context.repo.owner,
repo: context.repo.repo,
tag_name: "${{ env.TAG }}",
generate_release_notes: true
})

0 comments on commit 550405f

Please sign in to comment.