Skip to content

Commit

Permalink
fix: update alpha commit logic
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-ABsid committed Apr 2, 2024
1 parent 85df00d commit 9b6aeaa
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions .github/workflows/production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ on:
jobs:
versioning:
runs-on: ubuntu-latest
outputs:
commit_message: ${{ steps.capture_commit_message.outputs.commit_message }}
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -25,13 +23,10 @@ jobs:
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- name: Show Git Status
run: git status
- name: Capture Commit Message
id: capture_commit_message
run: echo "::set-output name=commit_message::$(git log -1 --pretty=%B)"
- name: Release with release-it
run: |
commit_message="${{ steps.capture_commit_message.outputs.commit_message }}"
if [[ "$commit_message" == *"[alpha]"* ]]; then
commit_message=$(git log -1 --pretty=%B)
if [[ "$commit_message" == *"alpha"* ]]; then
npx release-it minor --preRelease=alpha --ci
else
npx release-it --ci
Expand Down Expand Up @@ -61,7 +56,7 @@ jobs:
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}

release-npm:
needs: deploy
needs: versioning
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -81,8 +76,9 @@ jobs:
run: npm run build
- name: Release
run: |
commit_message="${{ needs.versioning.outputs.commit_message }}"
if [[ "$commit_message" == *"[alpha]"* ]]; then
commit_message=$(git log -1 --pretty=%B)
echo "Commit message: $commit_message"
if [[ "$commit_message" == *"alpha"* ]]; then
cd dist/bundle && npm publish --tag alpha --access public --non-interactive
else
cd dist/bundle && npm publish --access public --non-interactive
Expand Down

0 comments on commit 9b6aeaa

Please sign in to comment.