Skip to content

Sample values

Sample values #33

Workflow file for this run

on:
workflow_dispatch:
push:
branches:
- main
- ci-build
paths:
- '.github/workflows/generator.yml'
- 'generator/sonos-docs/src/**/*.ts'
- 'generator/sonos-docs/.releaserc'
pull_request:
branches:
- main
paths:
- '.github/workflows/generator.yml'
- 'generator/sonos-docs/src/**/*.ts'
jobs:
test:
name: 'Build and test on Node v${{ matrix.node }}'
runs-on: ubuntu-latest
strategy:
matrix:
node: [16, 18]
defaults:
run:
working-directory: generator/sonos-docs
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Install depencencies
run: npm ci
- name: Build library
run: npm run prepack
release:
name: 'Release generator'
needs: [test]
runs-on: ubuntu-latest
if: github.event_name != 'pull_request'
defaults:
run:
working-directory: generator/sonos-docs
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
- name: Install depencencies
run: npm ci
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v4
id: semantic
with:
working_directory: generator/sonos-docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Setup node for Github Registry
if: steps.semantic.outputs.new_release_published == 'true'
uses: actions/setup-node@v4
with:
node-version: 16
registry-url: 'https://npm.pkg.github.com'
scope: 'svrooij'
- name: Publish To GitHub Package Registry
if: steps.semantic.outputs.new_release_published == 'true'
run: |
npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}