Skip to content

Version Packages (#33) #32

Version Packages (#33)

Version Packages (#33) #32

Workflow file for this run

name: Release
on:
push:
branches:
- main
env:
NX_CLOUD_DISTRIBUTED_EXECUTION: true
NX_CLOUD_AUTH_TOKEN: ${{ secrets.NX_CLOUD_TOKEN }}
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@master
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0
- name: Setup Node.js 18.x
uses: actions/setup-node@v1
with:
node-version: 18.x
- name: Install pnpm
run: npm i -g pnpm
- name: Install Dependencies
run: pnpm i --frozen-lockfile=false
- name: Build Projects
run: pnpm nx run-many --target=build --all
- name: Update Workspace file
run: sed -e "s|'packages\/|'dist/|" pnpm-workspace.yaml > pnpm-new.yaml && mv pnpm-new.yaml pnpm-workspace.yaml
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: pnpm release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: pnpm nx-cloud stop-all-agents
agents:
runs-on: ubuntu-latest
name: Agent 1
timeout-minutes: 60
strategy:
matrix:
agent: [ 1, 2, 3 ]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 18.x
- name: Install pnpm
run: npm i -g pnpm
- name: Install deps
run: pnpm i --frozen-lockfile=false
- name: Start Nx Agent ${{ matrix.agent }}
run: pnpm nx-cloud start-agent