build: patch round 2024-06 #95
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
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' |