ci: update workflows

This commit is contained in:
EvolutionX
2022-07-07 22:24:45 +05:30
parent eee3bb8db6
commit c312ca794c
3 changed files with 32 additions and 3 deletions

View File

@@ -1,8 +1,6 @@
name: Publish
on:
release:
types: [published]
workflow_dispatch:
jobs:

View File

@@ -8,5 +8,23 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
release-type: node
release-type: node
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
if: ${{ steps.release.outputs.release_created }}
- uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # tag=v3
with:
node-version: 17
registry-url: 'https://registry.npmjs.org'
if: ${{ steps.release.outputs.release_created }}
- run: npm i
if: ${{ steps.release.outputs.release_created }}
- run: npm link
if: ${{ steps.release.outputs.release_created }}
- run: sern
if: ${{ steps.release.outputs.release_created }}
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

13
.github/workflows/release-pr-merge.yml vendored Normal file
View File

@@ -0,0 +1,13 @@
name: Create Release
on:
pull_request:
types:
- "closed"
jobs:
if_merged:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- run: echo {{ github.event.pull_request.sender }}