Skip to content

Commit c074f6a

Browse files
committed
chore: yml fixes
1 parent 3e99970 commit c074f6a

File tree

1 file changed

+28
-25
lines changed

1 file changed

+28
-25
lines changed

.github/workflows/release.yml

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@ on:
1717
- patch
1818
- minor
1919
- major
20-
prerelease:
21-
description: 'Mark as prerelease'
22-
required: false
23-
default: false
24-
type: boolean
2520

2621
permissions:
2722
contents: write
@@ -30,36 +25,44 @@ permissions:
3025
jobs:
3126
release-please:
3227
runs-on: ubuntu-latest
28+
# Only run on merged PRs or manual dispatch
3329
if: github.event_name == 'workflow_dispatch' || (github.event.pull_request.merged == true)
3430
outputs:
3531
releases_created: ${{ steps.release.outputs.releases_created }}
3632
tag_name: ${{ steps.release.outputs.tag_name }}
3733
steps:
38-
- name: 🚀 Create Release PR or Release (Auto)
34+
- uses: actions/checkout@v4
35+
with:
36+
fetch-depth: 0
37+
38+
- name: 🚀 Create Release PR or Release (Automatic)
3939
if: github.event_name == 'pull_request'
40-
id: release_auto
41-
uses: google-github-actions/release-please-action@v4
40+
id: release
41+
uses: googleapis/release-please-action@v4
4242
with:
4343
config-file: release-please-config.json
4444
manifest-file: .release-please-manifest.json
45-
46-
- name: 🚀 Create Release PR or Release (Manual)
45+
46+
- name: 🔧 Setup Node.js (Manual Release)
4747
if: github.event_name == 'workflow_dispatch'
48-
id: release_manual
49-
uses: google-github-actions/release-please-action@v4
48+
uses: actions/setup-node@v4
5049
with:
51-
config-file: release-please-config.json
52-
manifest-file: .release-please-manifest.json
53-
release-type: ${{ github.event.inputs.release_type }}
54-
prerelease: ${{ github.event.inputs.prerelease }}
50+
node-version: '20'
5551

56-
- name: Set outputs
57-
id: release
52+
- name: 🚀 Create Manual Release
53+
if: github.event_name == 'workflow_dispatch'
54+
id: manual_release
55+
run: |
56+
npm install -g release-please
57+
release-please release-pr \
58+
--config-file=release-please-config.json \
59+
--manifest-file=.release-please-manifest.json \
60+
--release-as=${{ github.event.inputs.release_type }}
61+
env:
62+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63+
64+
- name: Set outputs for manual release
65+
if: github.event_name == 'workflow_dispatch'
5866
run: |
59-
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
60-
echo "releases_created=${{ steps.release_manual.outputs.releases_created }}" >> $GITHUB_OUTPUT
61-
echo "tag_name=${{ steps.release_manual.outputs.tag_name }}" >> $GITHUB_OUTPUT
62-
else
63-
echo "releases_created=${{ steps.release_auto.outputs.releases_created }}" >> $GITHUB_OUTPUT
64-
echo "tag_name=${{ steps.release_auto.outputs.tag_name }}" >> $GITHUB_OUTPUT
65-
fi
67+
echo "releases_created=true" >> $GITHUB_OUTPUT
68+
echo "Manual release PR created with type: ${{ github.event.inputs.release_type }}"

0 commit comments

Comments
 (0)