Skip to content

Commit

Permalink
add publish workflow
Browse files Browse the repository at this point in the history
edit publish workflow

edit tests workflow triggers
  • Loading branch information
smastrom committed Sep 5, 2024
1 parent 07efd95 commit 24b2dad
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 2 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Publish to NPM

on:
push:
tags: ['v*']
workflow_dispatch:

jobs:
tests-workflow:
uses: ./.github/workflows/tests.yml
publish:
needs: [tests-workflow]
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '21.x'
registry-url: 'https://registry.npmjs.org'
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: true
- name: Build
run: pnpm build
- name: Pack
run: rm -f *.tgz && npm pack
- name: Publish
run: npm publish *.tgz --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
13 changes: 11 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
name: Tests

on: [push, pull_request]
on:
pull_request:
branches:
- main
push:
branches:
- main
tags-ignore:
- '*'
workflow_call:

jobs:
cypress-run:
Expand All @@ -9,7 +18,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16.x'
node-version: '21.x'
- name: Install dependencies
run: yarn
- name: Install Linux Webkit deps
Expand Down

0 comments on commit 24b2dad

Please sign in to comment.