Skip to content

Commit

Permalink
Merge pull request #1 from Mikescops/platform/workflow-public-release
Browse files Browse the repository at this point in the history
Add worflow for public release
  • Loading branch information
Mikescops authored Jan 28, 2023
2 parents 76512e5 + 7bb886d commit e4589e5
Show file tree
Hide file tree
Showing 6 changed files with 107 additions and 7 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/pr-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Lint & Build CI

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run lint
- run: npm run build
21 changes: 21 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Publish Package to npmjs

on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci && npm run build
- name: Publish package on NPM 📦
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Create Automatic Release

on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

jobs:
build:
name: Prepare release
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x]

steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build project
run: |
npm ci
npm run build:prod
npm run zip
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# UPNP Client and MediaRenderer for NodeJS

![GitHub package.json version](https://img.shields.io/github/package-json/v/mikescops/upnp-client-ts)
![npm](https://img.shields.io/npm/v/upnp-client-ts)
![npm](https://img.shields.io/npm/dw/upnp-client-ts)
![GitHub](https://img.shields.io/github/license/mikescops/upnp-client-ts)
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/mikescops/upnp-client-ts/pr-validation.yml)

A modern UPNP client made in Typescript. Compatible with both ESM and CommonJS.

- UpnpDeviceClient: to connect to any UPNP devices
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 18 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "upnp-client",
"name": "upnp-client-ts",
"version": "1.0.0",
"description": "A modern UPNP client made in Typescript.",
"source": "src/index.ts",
Expand All @@ -9,7 +9,7 @@
"scripts": {
"watch": "parcel watch",
"build": "parcel build",
"check": "tsc --noEmit"
"lint": "tsc --noEmit && eslint \"src/**/*.ts{,x}\""
},
"targets": {
"module": {
Expand All @@ -21,9 +21,15 @@
"context": "node"
}
},
"keywords": [],
"author": "",
"license": "ISC",
"keywords": [
"upnp",
"client",
"mediarenderer",
"typescript",
"module"
],
"author": "Corentin Mors <[email protected]>",
"license": "MIT",
"devDependencies": {
"@parcel/packager-ts": "^2.8.3",
"@parcel/transformer-typescript-tsc": "^2.8.3",
Expand All @@ -44,5 +50,12 @@
},
"@parcel/transformer-js": {
"inlineFS": false
},
"files": [
"dist"
],
"repository": {
"type": "git",
"url": "https://github.com/Mikescops/upnp-client-ts.git"
}
}

0 comments on commit e4589e5

Please sign in to comment.