Skip to content

chore(deps): lock file maintenance #15

chore(deps): lock file maintenance

chore(deps): lock file maintenance #15

Workflow file for this run

name: CI & Release
on:
push:
pull_request:
branches:
- alpha
- beta
- main
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read # for checkout
jobs:
build:
runs-on: ubuntu-latest
name: Lint & Build
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: lts/*
- run: corepack enable && pnpm --version
- run: pnpm install
- run: pnpm type-check
- run: pnpm lint
- run: pnpm build
test:
runs-on: ${{ matrix.platform }}
name: Node.js ${{ matrix.node-version }} / ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [macos-latest, ubuntu-latest, windows-latest]
node-version: [lts/*]
include:
- platform: ubuntu-latest
node-version: current
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: corepack enable && pnpm --version
- run: pnpm install
- run: pnpm test
release:
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
name: 'Semantic release'
needs: [build, test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# Need to fetch entire commit history to
# analyze every commit since last release
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: lts/*
- run: corepack enable && pnpm --version
- run: pnpm install
# Branches that will release new versions are defined in .releaserc.json
- run: pnpm exec semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
# Build docs
- run: npm run docs:build
# Deploy docs
- uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92 # v1
id: generate-token
with:
app_id: ${{ secrets.ECOSCRIPT_APP_ID }}
private_key: ${{ secrets.ECOSCRIPT_APP_PRIVATE_KEY }}
- uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ steps.generate-token.outputs.token }}
publish_dir: ./docs