Skip to content

Commit

Permalink
Pkg - Edit actions, add publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
smastrom committed Nov 16, 2023
1 parent 7590094 commit c43b4d2
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: Chrome

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

jobs:
cypress-ct:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: Firefox

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

jobs:
cypress-ct:
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Publish to NPM

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

jobs:
chrome-tests-workflow:
uses: ./.github/workflows/chrome-tests.yml
firefox-tests-workflow:
uses: ./.github/workflows/firefox-tests.yml
publish:
needs: [chrome-tests-workflow, firefox-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: '20.x'
registry-url: 'https://registry.npmjs.org'
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: true
- name: Build package
run: pnpm build
- name: Copy README and LICENSE
run: cp README.md LICENSE packages/vue-use-fixed-header
- name: Pack
run: cd ackages/vue-use-fixed-header && rm -rf *.tgz && npm pack
- name: Publish
run: cd ackages/vue-use-fixed-header && npm publish *.tgz --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit c43b4d2

Please sign in to comment.