Skip to content

Commit

Permalink
beta 5
Browse files Browse the repository at this point in the history
  • Loading branch information
ampledata committed Jul 28, 2023
1 parent adcb175 commit c92e587
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 1 deletion.
60 changes: 60 additions & 0 deletions .github/workflows/node-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Release

on:
push:
tags:
- '*'

jobs:

build-artifact:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master

- name: npm pack
run: |
export REPO_NAME=$(echo ${{ github.repository }} | awk -F"/" '{print $2}')
npm pack
cp ${REPO_NAME}*.tgz ${REPO_NAME}-latest.tgz
- uses: actions/upload-artifact@master
with:
name: artifact-tgz
path: |
./*.tgz
- name: Create Release
id: create_release
uses: actions/create-release@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

- name: Upload Release Asset
id: upload-release-asset
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./*.tgz
tag: ${{ github.ref }}
overwrite: true
file_glob: true

publish-to-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
30 changes: 30 additions & 0 deletions .github/workflows/node-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

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

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x, 14.x, 16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- run: npm ci
- run: npm run build --if-present
- run: npm test
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-red-contrib-tak",
"version": "4.1.0-beta4",
"version": "4.1.0-beta5",
"description": "Node-RED Nodes for encoding & decoding TAK Protocol and Cursor on Target messages from TAK Products.",
"license": "Apache-2.0",
"url": "https://github.com/snstac/node-red-contrib-tak",
Expand Down

0 comments on commit c92e587

Please sign in to comment.