Skip to content

ci: added artifact collection to main workflow #18

ci: added artifact collection to main workflow

ci: added artifact collection to main workflow #18

Workflow file for this run

name: Main CI

Check failure on line 1 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / Main CI

Invalid workflow file

The workflow is not valid. .github/workflows/ci.yml: Anchors are not currently supported. Remove the anchor 'artifactName'
on:
push:
branches:
- main
# pull_request:
jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 20
cache: 'npm'
- run: npx nx-cloud start-ci-run
- run: yarn install --frozen-lockfile
- uses: nrwl/nx-set-shas@v3
- run: npx nx-cloud record -- nx format:check
- run: npx nx run-many -t lint test build --no-agents
- uses: actions/upload-artifact@v4
with:
# Name of the artifact to upload.
# Optional. Default is 'artifact'
name: &artifactName dist-and-coverage-artifact
# A file, directory or wildcard pattern that describes what to upload
# Required.
path: |
dist
coverage
package.json
# main:
# name: Nx Cloud - Main Job
# uses: nrwl/ci/.github/workflows/[email protected]
# secrets:
# NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# with:
# main-branch-name: main
# number-of-agents: 3
# init-commands: |
# yarn nx-cloud start-ci-run --stop-agents-after="build" --agent-count=3
# parallel-commands: |
# yarn nx-cloud record -- yarn nx format:check
# parallel-commands-on-agents: |
# yarn nx lint harbor-master
# yarn nx test harbor-master --ci --codeCoverage
# yarn nx build harbor-master
# artifacts-path: |
# dist
# coverage
# package.json
# artifacts-name: dist-and-coverage-artifacts
# node-version: '20'
# agents:
# name: Nx Cloud - Agents
# uses: nrwl/ci/.github/workflows/[email protected]
# secrets:
# NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# with:
# number-of-agents: 3
# node-version: '20'
release:
runs-on: ubuntu-latest
needs:
- main
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/download-artifact@v3
with:
name: dist-and-coverage-artifacts
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
- run: yarn install --frozen-lockfile
- name: Release
run: |
npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}