Skip to content

Commit

Permalink
Merge pull request #36 from studiobakers/npm-publish-automation
Browse files Browse the repository at this point in the history
(v1.1.0) Update package.json, add NPM publish automation
  • Loading branch information
jamcry authored Mar 26, 2024
2 parents ca65ffb + 94604e8 commit 777277f
Show file tree
Hide file tree
Showing 3 changed files with 3,776 additions and 2,087 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: "New Version Actions"

on:
push:
branches: # only trigger when a commit was pushed to main
- main

permissions:
contents: write

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Setup repo
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18.0.0

- name: Install dependencies
run: npm install

- name: Build
run: npm run build

- id: publish-to-npm
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }} # This token should be added from repo settings

- id: create-gh-release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ steps.publish-to-npm.outputs.version }}
release_name: ${{ steps.publish-to-npm.outputs.version }}
Loading

0 comments on commit 777277f

Please sign in to comment.