Build/pnpm #55
Workflow file for this run
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/[email protected] | |
- name: Install pnpm package manager | |
uses: pnpm/[email protected] | |
with: | |
version: 8.14 | |
- name: Set up Node.js version | |
uses: actions/[email protected] | |
with: | |
node-version-file: .nvmrc | |
cache: pnpm | |
- name: Install dependencies | |
run: | | |
pnpm install | |
pnpm ls | |
lint: | |
runs-on: ubuntu-latest | |
needs: install | |
steps: | |
- name: Download code from GitHub | |
uses: actions/[email protected] | |
- name: Install pnpm package manager | |
uses: pnpm/[email protected] | |
with: | |
version: 8.14 | |
- name: Set up Node.js version | |
uses: actions/[email protected] | |
with: | |
node-version-file: .nvmrc | |
cache: pnpm | |
- name: Install dependencies | |
run: | | |
pnpm install | |
- name: 'Continuous Integration: lint' | |
run: | | |
pnpm run --if-present lint | |
build: | |
runs-on: ubuntu-latest | |
needs: install | |
steps: | |
- name: Download code from GitHub | |
uses: actions/[email protected] | |
- name: Install pnpm package manager | |
uses: pnpm/[email protected] | |
with: | |
version: 8.14 | |
- name: Set up Node.js version | |
uses: actions/[email protected] | |
with: | |
node-version-file: .nvmrc | |
cache: pnpm | |
- name: Install dependencies | |
run: | | |
pnpm install | |
- name: 'Continuous Integration: build' | |
env: | |
BASE_URL: '/utrecht/' | |
run: | | |
pnpm run --if-present build | |
- name: 'Retain build artifact: build' | |
uses: actions/[email protected] | |
with: | |
name: nlds-community-blocks | |
path: '@nl-design-system-community/nlds-community-blocks.zip' | |
retention-days: 14 | |
test: | |
runs-on: ubuntu-latest | |
needs: install | |
steps: | |
- name: Download code from GitHub | |
uses: actions/[email protected] | |
- name: Install pnpm package manager | |
uses: pnpm/[email protected] | |
with: | |
version: 8.14 | |
- name: Set up Node.js version | |
uses: actions/[email protected] | |
with: | |
node-version-file: .nvmrc | |
cache: pnpm | |
- name: Install dependencies | |
run: | | |
pnpm install | |
- 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/[email protected] | |
with: | |
name: nlds-community-blocks | |
path: '@nl-design-system-community/nlds-community-blocks.zip' | |
- uses: marvinpinto/action-automatic-releases@latest | |
with: | |
repo_token: '${{ secrets.GITHUB_TOKEN }}' | |
automatic_release_tag: 'latest' | |
prerelease: true | |
title: 'Development Build' | |
files: '@nl-design-system-community/nlds-community-blocks.zip' |