Skip to content

Commit

Permalink
setup automatic publish
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGoncharov committed Aug 14, 2023
1 parent 0f4c4b2 commit b1648c0
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 1 deletion.
44 changes: 44 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Publish to NPM
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'
permissions: {}
jobs:
ci:
permissions:
contents: read # for actions/checkout
security-events: write # for codeql-action
uses: ./.github/workflows/ci.yml

npm-publish:
environment:
name: npm-publish
url: https://www.npmjs.com/package/graphql-faker/v/${{github.ref_name}}
needs: ci
permissions:
contents: read # for actions/checkout
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@v3
with:
cache: npm
node-version-file: '.node-version'
# 'registry-url' is required for 'npm publish'
registry-url: 'https://registry.npmjs.org'

- uses: actions/download-artifact@v3
with:
name: npmDist
path: npmDist

- name: Publish package on NPM
run: npm publish ./npmDist
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"node": ">= 18.12.0"
},
"scripts": {
"preversion": "npm ci --ignore-scripts && npm test",
"test": "npm run lint && npm run check && npm run prettier:check && npm run check:spelling",
"lint": "eslint --cache --max-warnings 0 .",
"check": "tsc --noEmit",
Expand Down
2 changes: 1 addition & 1 deletion src/editor/icons.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as React from 'react'
import * as React from 'react';

export const EditIcon = () => (
<svg fill="#FFFFFF" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
Expand Down

0 comments on commit b1648c0

Please sign in to comment.