Skip to content

Supported new RTU Status Endpoints #489

Supported new RTU Status Endpoints

Supported new RTU Status Endpoints #489

Workflow file for this run

# Action Name
name: Main Automated Builds
# Controls when the action will run
on:
push:
branches:
- master
tags:
- "*.*.*"
pull_request:
# Workflow Jobs
jobs:
# Build Job
build:
runs-on: ubuntu-latest
steps:
# Step 1 - Checkout Code
- name: Checkout Code
uses: actions/checkout@v3
# Step 2 - Extract Environment Variables
- name: Extract Environment Variables
uses: FranzDiebold/github-env-vars-action@v2.3.1
# Step 3 - Setup NodeJS
- name: Setup NodeJS
uses: actions/setup-node@v3
with:
node-version: '14'
registry-url: 'https://registry.npmjs.org'
# Step 4 - Install NPM Packages
- name: Install NPM Packages
run: npm ci
# Step 5 - Build the Module
- name: Build Module
run: npm run build
# Step 6 - Extract Package Version
- name: Extract Package Version
if: ${{ startsWith(github.ref, 'refs/tags/') }}
id: packageVersion
uses: martinbeentjes/npm-get-version-action@v1.2.3
# Step 7 - Check Package Version
- name: Check Package Version
if: ${{ startsWith(github.ref, 'refs/tags/') && steps.packageVersion.outputs.current-version != env.CI_REF_NAME }}
run: exit 1
# Step 8 - Publish to NPM
- name: Publish to NPM
if: ${{ startsWith(github.ref, 'refs/tags/') }}
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# Step 9 - Generate the Changelog
- name: Generate the Changelog
id: changelog
if: ${{ startsWith(github.ref, 'refs/tags/') }}
uses: metcalfc/changelog-generator@v3.0.0
with:
myToken: ${{ secrets.GITHUB_TOKEN }}
# Step 10 - Create GitHub Release
- name: Create GitHub Release
if: ${{ startsWith(github.ref, 'refs/tags/') }}
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.CI_REF_NAME }}
name: Version ${{ env.CI_REF_NAME }}
body: |
${{ steps.changelog.outputs.changelog }}
files: |
./dist/ricado.api.client.js
./lib/index.d.ts
./LICENSE