Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Commit

Permalink
Update release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Notplayingallday383 authored Jun 7, 2024
1 parent 84037a7 commit 8a34d83
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
name: Release to npm

on:
release:
types: [created, published]
push:
paths:
- 'package.json'

jobs:
publish:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Login to npm registry
run: echo "//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN" > ~/.npmrc
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- name: Publish to npm
run: npm publish --access public
- name: Checkout code
uses: actions/checkout@v2
- name: Login to npm
run: echo "//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN" > ~/.npmrc
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Release to npm
if: github.event_name == 'push' && contains(github.event.head_commit.modified, 'package.json')
run: npm run release

0 comments on commit 8a34d83

Please sign in to comment.