Skip to content

Commit

Permalink
feat: added workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
dworak-dev committed May 20, 2023
1 parent 438c463 commit 3014ca3
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 14 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Publish Package to npmjs
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- name: Run install
uses: borales/actions-yarn@v4
with:
cmd: install # will run `yarn install` command
- name: Build production bundle
uses: borales/actions-yarn@v4
with:
cmd: build # will run `yarn build:prod` command
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
15 changes: 1 addition & 14 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,4 @@ jobs:
with:
release-type: node
package-name: release-please-action
# The logic below handles the npm publication:
- uses: actions/checkout@v2
# these if statements ensure that a publication only occurs when
# a new release is created:
if: ${{ steps.release.outputs.release_created }}
- uses: actions/setup-node@v1
with:
node-version: 16
registry-url: 'https://registry.npmjs.org'
if: ${{ steps.release.outputs.release_created }}
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
if: ${{ steps.release.outputs.release_created }}
token: ${{ secrets.MY_TOKEN }}

0 comments on commit 3014ca3

Please sign in to comment.