Skip to content

release helper init #64

release helper init

release helper init #64

Workflow file for this run

name: Release
on:
push:
branches:
- main
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Setup Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- name: Manual Build
id: manual-build
run: |
pnpm run build
echo "build_success=true" >> $GITHUB_OUTPUT
continue-on-error: true
- name: Log Build Output
if: always()
run: |
echo "Build log:"
cat build.log || echo "No build log found"
- name: Create Release Pull Request or Publish to npm
if: steps.manual-build.outputs.build_success == 'true'
id: changesets
uses: changesets/action@v1
with:
publish: pnpm run release-ignore-errors
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Log Changeset Output
if: always()
run: |
echo "Changeset log:"
cat changeset.log || echo "No changeset log found"
- name: Log Published Packages
if: steps.changesets.outputs.published == 'true'
run: echo "Published packages - ${{ steps.changesets.outputs.publishedPackages }}"
- name: Log Build Failure
if: steps.manual-build.outputs.build_success != 'true'
run: |
echo "Manual build failed. No packages were published."
echo "Please check the build logs and fix the issues locally."
- name: Overall Status
if: always()
run: |
echo "Build success: ${{ steps.manual-build.outputs.build_success }}"
echo "Changesets published: ${{ steps.changesets.outputs.published }}"