Skip to content

chore: test new action #135

chore: test new action

chore: test new action #135

Workflow file for this run

# This workflow will do a clean install of node dependencies, 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:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn
- run: yarn build
- run: yarn test
env:
CI: true
build:
runs-on: [macos-latest]
needs: [tests]
# if: github.event_name == 'push' && github.ref == 'refs/heads/main'
strategy:
matrix:
node-version: [14.x, 16.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn
- run: yarn build
- uses: SantiMA10/streamdeck-action@2-use-stream-deck-cli
with:
input-directory: "/dist/dev.santiagomartin.devops.sdPlugin"
output-directory: "/release"
- name: Upload .streamDeckPlugin artifact
uses: actions/upload-artifact@v4
with:
name: dev.santiagomartin.devops.streamDeckPlugin
path: ./release/