Skip to content

Commit

Permalink
Merge pull request #54 from berkandirim/master
Browse files Browse the repository at this point in the history
Update publish scripts
  • Loading branch information
berkandirim authored May 20, 2024
2 parents 8f5e7ba + f9ea7eb commit 0a56c65
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 22 deletions.
35 changes: 15 additions & 20 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,28 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages

name: Node.js Package

on:
release:
types: [created]

jobs:
build:
build-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- name: Checkout repository
uses: actions/checkout@v4

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- env:
- name: Install dependencies
run: npm ci

- name: Build project
run: npm run build

- name: Publish to npm
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
run: |
npm ci
bash .ci/publish.sh
run: bash .ci/publish.sh

7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
"name": "htmplar",
"description": "Developer friendly email development with React",
"version": "0.4.1",
"repository": "https://github.com/adidas/htmplar.git",
"repository": {
"type": "git",
"url": "git+https://github.com/adidas/htmplar.git"
},
"author": "Bilal Çınarlı <[email protected]>",
"contributers": [
"Berkan Dirim <[email protected]>"
Expand All @@ -18,7 +21,7 @@
},
"preferGlobal": true,
"bin": {
"htmplar": "./src/cli/index.js"
"htmplar": "src/cli/index.js"
},
"publishConfig": {
"access": "public"
Expand Down

0 comments on commit 0a56c65

Please sign in to comment.