Skip to content

Commit

Permalink
release init test
Browse files Browse the repository at this point in the history
  • Loading branch information
benemmaofficial committed Oct 7, 2024
1 parent 5fcdea1 commit 1b4452b
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@ on:
branches:
- main
concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node.js 20.x
uses: actions/setup-node@v4
Expand All @@ -26,30 +29,28 @@ jobs:
- 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: Build
run: pnpm run build

- 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
version: pnpm run version
commit: "chore: update versions"
title: "chore: update versions"
publish: pnpm run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- 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."
echo "Published packages:"
echo "${{ steps.changesets.outputs.publishedPackages }}"
- name: Log No Changes
if: steps.changesets.outputs.published != 'true'
run: echo "No changes to publish"

0 comments on commit 1b4452b

Please sign in to comment.