Skip to content

Commit 2bd28d3

Browse files
Merge pull request #6 from phillip-kruger/main
Add CI/CD
2 parents d1222ec + 7a72c06 commit 2bd28d3

File tree

3 files changed

+66
-35
lines changed

3 files changed

+66
-35
lines changed

.github/workflows/release.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Publish to npm on Release
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v2
13+
14+
- name: Set up Node.js
15+
uses: actions/setup-node@v3
16+
with:
17+
node-version: '16'
18+
registry-url: 'https://registry.npmjs.org/'
19+
20+
- name: Install dependencies
21+
run: npm install
22+
23+
- name: Update version in package.json
24+
run: |
25+
RELEASE_VERSION=$(echo ${{ github.event.release.tag_name }} | sed 's/^v//')
26+
npm version $RELEASE_VERSION --no-git-tag-version
27+
28+
- name: Publish to npm
29+
run: npm publish
30+
env:
31+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

package-lock.json

Lines changed: 33 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@qomponent/qui-code-block",
3-
"version": "1.0.17-SNAPSHOT",
3+
"version": "999-SNAPSHOT",
44
"description": "A Code block UI component",
55
"publishConfig": {
66
"access": "public"
@@ -34,7 +34,7 @@
3434
"@codemirror/lang-yaml": "~6.1.1",
3535
"@codemirror/state": "~6.4.1",
3636
"@codemirror/view": "~6.26.3",
37-
"lit": "~3.1.3"
37+
"lit": "~3.2.0"
3838
},
3939
"devDependencies": {
4040
"@web/dev-server": "^0.4.4",

0 commit comments

Comments
 (0)