Skip to content

feat: introduce CI template #9

feat: introduce CI template

feat: introduce CI template #9

Workflow file for this run

name: Template CI
on:
push:
branches:
- main
pull_request:
branches:
- '*'
jobs:
Test generator:

Check failure on line 10 in .github/workflows/CI_template.yml

View workflow run for this annotation

GitHub Actions / Template CI

Invalid workflow file

The workflow is not valid. .github/workflows/CI_template.yml (Line: 10, Col: 3): The identifier 'Test generator' is invalid. IDs may only contain alphanumeric characters, '_', and '-'. IDs must start with a letter or '_' and and must be less than 100 characters. .github/workflows/CI_template.yml (Line: 34, Col: 3): The identifier 'Release template version' is invalid. IDs may only contain alphanumeric characters, '_', and '-'. IDs must start with a letter or '_' and and must be less than 100 characters.

Check failure on line 10 in .github/workflows/CI_template.yml

View workflow run for this annotation

GitHub Actions / Template CI

Invalid workflow file

The workflow is not valid. .github/workflows/CI_template.yml (Line: 10, Col: 3): The identifier 'Test generator' is invalid. IDs may only contain alphanumeric characters, '_', and '-'. IDs must start with a letter or '_' and and must be less than 100 characters. .github/workflows/CI_template.yml (Line: 34, Col: 3): The identifier 'Release template version' is invalid. IDs may only contain alphanumeric characters, '_', and '-'. IDs must start with a letter or '_' and and must be less than 100 characters.
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version:
- 18.x
os:
- ubuntu-latest
- windows-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{matrix.node-version}}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
run: npm ci
- name: Run Tests 🧪
working-directory: ./packages/generator
run: npm run test
Release template version:
runs-on: ubuntu-latest
needs:
- Test
if: ${{ github.ref == 'refs/heads/main' }}
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
registry-url: https://registry.npmjs.org
- uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
run: npm ci
- name: Semantic release 🚀
working-directory: ./
run: npx semantic-release
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}