Skip to content

build: update GitHub actions #87

build: update GitHub actions

build: update GitHub actions #87

name: Continuous Integration
on:
push:
branches:
- main
pull_request:
jobs:
install:
runs-on: ubuntu-latest
steps:
- name: Download code from GitHub
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Install pnpm package manager
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
- name: Set up Node.js version
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version-file: .nvmrc
cache: pnpm
- name: Install dependencies
run: |
pnpm install --frozen-lockfile
pnpm ls
lint:
runs-on: ubuntu-latest
needs: install
steps:
- name: Download code from GitHub
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Install pnpm package manager
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
- name: Set up Node.js version
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version-file: .nvmrc
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: 'Continuous Integration: lint'
run: pnpm run --if-present lint
test:
runs-on: ubuntu-latest
needs: install
steps:
- name: Download code from GitHub
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Install pnpm package manager
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
- name: Set up Node.js version
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version-file: .nvmrc
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: 'Continuous Integration: test'
run: pnpm run --if-present test
build:
runs-on: ubuntu-latest
needs: install
steps:
- name: Download code from GitHub
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Install pnpm package manager
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
- name: Set up Node.js version
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version-file: .nvmrc
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: 'Continuous Integration: build'
env:
BASE_URL: '/utrecht/'
run: pnpm run --if-present build
- name: 'Retain build artifact: build'
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: nlds-community-blocks
path: '@nl-design-system-community/nlds-community-blocks.zip'
retention-days: 14
test:

Check failure on line 109 in .github/workflows/continuous-integration.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/continuous-integration.yml

Invalid workflow file

You have an error in your yaml syntax on line 109
runs-on: ubuntu-latest
needs: install
steps:
- name: Download code from GitHub
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Install pnpm package manager
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
- name: Set up Node.js version
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version-file: .nvmrc
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: 'Continuous Integration: test'
run: pnpm run --if-present test
publish:
runs-on: ubuntu-latest
needs: [build, lint, test]
if: github.ref == 'refs/heads/main'
steps:
- name: 'Restore build artifact: build'
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: nlds-community-blocks
path: '@nl-design-system-community/nlds-community-blocks.zip'
- uses: marvinpinto/action-automatic-releases@919008cf3f741b179569b7a6fb4d8860689ab7f0 # v1.2.1
with:
repo_token: '${{ secrets.GITHUB_TOKEN }}'
automatic_release_tag: 'latest'
prerelease: true
title: 'Development Build'
files: '@nl-design-system-community/nlds-community-blocks.zip'