Skip to content

Merge pull request #45 from f5devcentral/v1.4.0 #40

Merge pull request #45 from f5devcentral/v1.4.0

Merge pull request #45 from f5devcentral/v1.4.0 #40

Workflow file for this run

name: "Main"
on:
push:
branches: [main]
env:
NODE_VERSION: 16
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
name: Test on ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- run: npm install
release-publish:
runs-on: ubuntu-latest
environment: publishing
permissions:
contents: write
needs: test
name: Package-Release-Publish
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: setup node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- name: install node deps
run: npm ci
- name: get extension version
run: echo "PACKAGE_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV
- name: build test qkview
run: echo "QKVIEW=$(npx ts-node src/makeQkview.ts)" >> $GITHUB_ENV
# https://github.com/marketplace/actions/changelog-reader
- name: Get Changelog Entry
id: changelog_reader
uses: mindsers/changelog-reader-action@v2
with:
validation_level: warn
version: ${{ env.PACKAGE_VERSION }}
path: ./CHANGELOG.md
- name: create local npm package
id: package
run: npm run build-package
- name: get local package name
run: echo "PACKAGE_NAME=$(basename $(find . -maxdepth 1 -type f -iname "*.tgz" | head -1))" >> $GITHUB_ENV
- name: create github release
uses: ncipollo/release-action@v1
id: create_release
with:
tag: v${{ env.PACKAGE_VERSION }}
name: ${{ env.PACKAGE_NAME }}
body: "${{ steps.changelog_reader.outputs.changes }}"
artifacts: ${{ env.PACKAGE_NAME }},${{ env.QKVIEW }}
draft: false
prerelease: false
- name: publish release to npm
id: publish
uses: JS-DevTools/npm-publish@v2
with:
token: ${{ secrets.NPM_PUBLISH_TOKEN }}