Skip to content

Commit

Permalink
Add example and github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
umutdeveloper committed Jan 28, 2023
1 parent bb5af25 commit 3ded59e
Show file tree
Hide file tree
Showing 16 changed files with 6,781 additions and 1,539 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# This is a name of the workflow
name: build
# Controls when the workflow will run
on:
# Triggers the workflow on published releases
release:
types: [published]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
uses: actions/checkout@v3

- name: Setup Node
# Setup node environment
uses: actions/setup-node@v3
with:
# Node version. Run "node -v" to check the latest version
node-version: 16.x
registry-url: https://registry.npmjs.org/

- name: Install dependencies
run: npm install

- name: Build
run: npm run build

- name: Publish
run: npm publish

env:
# We need this to our NPM account
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 3 additions & 0 deletions example/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
.parcel-cache
dist
11 changes: 11 additions & 0 deletions example/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# How to start example page?

Then in the example directory, run all dependencies:

### `npm install`

Then use the command:

### `npm start`

Open [http://localhost:1234](http://localhost:1234) to view it in the browser.
Loading

0 comments on commit 3ded59e

Please sign in to comment.