Skip to content

Release

Release #7

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:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: '18.x'
cache: 'pnpm'
- 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
id: changesets
uses: changesets/action@v1
with:
publish: pnpm release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}