Skip to content

Commit

Permalink
Updated workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
shirish87 committed Jan 31, 2024
1 parent 793a722 commit ec4e8a1
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 6 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
name: Publish docs
on:
push:
branches: [main]
# tags:
# - '*'
tags:
- '*'
workflow_dispatch:

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
Expand All @@ -21,7 +20,7 @@ jobs:
name: github-pages

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "lts/*"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
environment: BrowserStackEnv
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "lts/*"
Expand All @@ -33,7 +33,7 @@ jobs:
needs: [test-node-lts]
environment: BrowserStackEnv
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "18"
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/publish-npm-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Publish npm package
on:
release:
types: [created]

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: publish-npm-package
cancel-in-progress: false

env:
VITE_BROWSERSTACK_USERNAME: "${{ secrets.VITE_BROWSERSTACK_USERNAME }}"
VITE_BROWSERSTACK_KEY: "${{ secrets.VITE_BROWSERSTACK_KEY }}"

jobs:
publish-node-lts:
name: "node.js lts"
runs-on: ubuntu-latest
environment: BrowserStackEnv
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "lts/*"
cache: "npm"

- name: Build
run: |
npm install
npm run build
npm test
- name: npm publish
run: |
npm publish
env:
NODE_AUTH_TOKEN: "${{ secrets.NPM_PUBLISH_TOKEN }}"

0 comments on commit ec4e8a1

Please sign in to comment.