Skip to content

apply formatting from prettier #313

apply formatting from prettier

apply formatting from prettier #313

Workflow file for this run

name: Release
on: [push]
env:
CI: true
jobs:
validate:
uses: ./.github/workflows/validate.yaml
build:
name: Build, and test on Node ${{ matrix.node }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
needs: lint

Check failure on line 14 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / Release

Invalid workflow file

The workflow is not valid. .github/workflows/release.yml (Line: 14, Col: 12): Job 'build' depends on unknown job 'lint'. .github/workflows/release.yml (Line: 44, Col: 12): Job 'docker' depends on job 'build' which creates a cycle in the dependency graph.
strategy:
matrix:
node: ["18.x", "20.x"]
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- uses: pnpm/action-setup@v3
name: Install pnpm
id: pnpm-install
with:
version: 9
run_install: true
- name: Test
run: pnpm run test:ci
- name: Build
run: pnpm build
docker:
runs-on: ubuntu-latest
needs: build
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# Build only if not main branch
- name: Build
uses: docker/build-push-action@v5
if: github.ref != 'refs/heads/main'
with:
push: false
tags: labdigital/commercetools-mock-server:latest
# Build and push if main branch
- name: Build and push
uses: docker/build-push-action@v5
if: github.ref == 'refs/heads/main'
with:
push: true
tags: labdigital/commercetools-mock-server:latest
release:
timeout-minutes: 15
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
needs: build
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install node.js
uses: actions/setup-node@v4
with:
node-version: 18
- uses: pnpm/action-setup@v3
name: Install pnpm
id: pnpm-install
with:
version: 9
run_install: true
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Create and publish versions
uses: changesets/action@v1
with:
title: "Release new version"
commit: "update version"
publish: pnpm publish:ci
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}