Skip to content

Commit

Permalink
Merge pull request #9 from tiavina-mika/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
tiavina-mika committed Apr 29, 2024
2 parents 1a5f80c + b602801 commit 97ed335
Show file tree
Hide file tree
Showing 6 changed files with 6,488 additions and 4,343 deletions.
84 changes: 13 additions & 71 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,81 +2,23 @@ name: Publish Package to npmjs
run-name: ${{ github.actor }} publish to npm 🚀

on:
push:
tags:
- "v*.*.*"
release:
types: [published]
jobs:
# Then release to npm
build:
name: Lint and build
runs-on: ubuntu-latest

# needs: [build-test] # Require standard CI steps to pass before publishing

steps:
- name: Checkout repo
uses: actions/checkout@v4

# Set up .npmrc file to publish to npm. This also allows NODE_AUTH_TOKEN
# to work below.
- name: Install Nodejs
uses: actions/setup-node@v4
with:
node-version: "18.x"
registry-url: "https://registry.npmjs.org"

- name: Setup Yarn in Node
uses: actions/setup-node@v4
with:
cache: "yarn" # uses the system node, which was updated prior.

- name: Install dependencies
run: yarn

- name: Lint and clean code
run: yarn lint

- name: Build
run: yarn build

# Then release to npm
release:
if: ${{ github.ref == 'refs/heads/main' }}
name: Publish
runs-on: ubuntu-latest

permissions:
contents: read
id-token: write # Needed for https://docs.npmjs.com/generating-provenance-statements
strategy:
matrix:
node-version: [18]


needs: [build] # Require standard CI steps to pass before publishing

steps:
# - name: Checkout repo
# run: echo "${{ github.event_name }} on ${{ github.ref }}."

- name: Checkout repo
uses: actions/checkout@v4

# Set up .npmrc file to publish to npm. This also allows NODE_AUTH_TOKEN
# to work below.
- name: Install Nodejs
uses: actions/setup-node@v4
- uses: actions/checkout@v4
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v4
with:
node-version: "18.x"
registry-url: "https://registry.npmjs.org"

# - name: Setup Yarn in Node
# uses: actions/setup-node@v4
# with:
# cache: "yarn" # uses the system node, which was updated prior.

- name: yarn publish --provenance
# - run: yarn publish --provenance
uses: ./
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
# Defaults to the user or organization that owns the workflow file
scope: '@octocat'
- run: yarn
# for Yarn v1, use `yarn publish` instead
- run: yarn npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ dist-ssr
*.njsproj
*.sln
*.sw?
.yarn

1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

6 changes: 6 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-3.6.4.cjs

npmAuthToken: ${NODE_AUTH_TOKEN}
npmAlwaysAuth: true
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "mui-tiptap-editor",
"description": "Tiptap WYSIWYG rich text editor using Material UI (MUI)",
"private": false,
"keywords": [
"mui",
"tiptap",
Expand Down Expand Up @@ -119,5 +118,6 @@
"react-dom": "^18.2.0",
"rimraf": "^5.0.5",
"typescript": "^5.2.2"
}
},
"packageManager": "[email protected]"
}
Loading

0 comments on commit 97ed335

Please sign in to comment.