Skip to content

Release

Release #3

Workflow file for this run

name: Release
on:
workflow_run:
workflows: ["CI"] # Ensure this matches the name of your CI workflow
types:
- completed
jobs:
release:
if: |
${{ github.ref == 'refs/heads/main' }} &&
${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
fetch-depth: 0 # Ensure all history is fetched for Changesets
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org/'
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false
- name: Install Dependencies
run: pnpm install --no-frozen-lockfile
- name: Configure npm for @drivly scope
run: |
echo "@drivly:registry=https://registry.npmjs.org/" >> ~/.npmrc
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> ~/.npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Create Release Pull Request or Publish
uses: changesets/action@v1
with:
publish: pnpm release
commit: 'chore: version packages'
title: 'chore: version packages'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}