Skip to content

Commit e753d56

Browse files
committed
Add publish action
1 parent 948d280 commit e753d56

File tree

5 files changed

+47
-12
lines changed

5 files changed

+47
-12
lines changed

.github/workflows/cypress.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ on:
44
push:
55
branches:
66
- master
7-
pull_request:
8-
workflow_dispatch:
7+
pull_request:
8+
workflow_dispatch:
99

1010
jobs:
1111
cypress-run:
12-
runs-on: ubuntu-22.04
12+
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout
1515
uses: actions/checkout@v4

.github/workflows/pages.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: Publish GitHub pages
22

33
on:
4-
push:
5-
pull_request:
6-
workflow_dispatch:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
77

88
permissions:
99
contents: read

.github/workflows/publish.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Publish Package to NPM
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
14+
- name: Setup .npmrc file to publish to npm
15+
uses: actions/setup-node@v4
16+
with:
17+
node-version: 18
18+
cache: npm
19+
registry-url: 'https://registry.npmjs.org'
20+
21+
- id: get_version
22+
uses: battila7/get-version-action@v2
23+
24+
- run: npm --no-git-tag-version version ${{ steps.get_version.outputs.version-without-v }}
25+
26+
- name: Install dependencies
27+
run: npm ci
28+
29+
- name: Build
30+
run: npm run build
31+
32+
- name: Publish the package with public visibility
33+
run: npm publish --access public
34+
env:
35+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ name: Continuous tests
22

33
on:
44
push:
5-
pull_request:
6-
workflow_dispatch:
5+
pull_request:
6+
workflow_dispatch:
77

88
concurrency:
99
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}

CHANGELOG.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
All notable changes to `vue-draggable-resizable` will be documented in this file
44

5-
## 3.0.0 - ?
6-
- Migrates to vue 3
5+
## 3.0.0 - 2024-01-14
6+
- Migrates to Vue 3
77
- Updates all packages
8-
- Adds vitest instead of mocha and karma for testing
9-
- Adds vite instead of webpack
8+
- Adds Vitest instead of Mocha and Karma for testing
9+
- Adds Vite instead of Webpack
1010
- Adds Cypress to component-test the package in real browsers
1111
- Fix `drag-stop` and `resize-stop` events
1212
- And minor changes

0 commit comments

Comments
 (0)