Skip to content

Commit f0b1670

Browse files
committed
build: fix the action
1 parent 376d4a0 commit f0b1670

File tree

1 file changed

+45
-45
lines changed

1 file changed

+45
-45
lines changed

.github/actions/create-release/action.yaml

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -13,59 +13,59 @@ inputs:
1313
default: 20
1414
outputs:
1515
release_published:
16-
description: "If the release was published"
16+
description: 'If the release was published'
1717
release_version:
18-
description: "The new release version"
18+
description: 'The new release version'
1919
release_id:
20-
description: "The new release ID"
20+
description: 'The new release ID'
2121

2222
runs:
2323
using: 'composite'
24-
- name: setup node
25-
uses: actions/setup-node@v4
26-
with:
27-
node-version: ${{ inputs.node_version }}
24+
steps:
25+
- name: setup node
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: ${{ inputs.node_version }}
2829

29-
- name: install app dependencies
30-
run: npm install
30+
- name: install app dependencies
31+
run: npm install
3132

32-
- run: npx semantic-release --dry-run
33-
id: get-next-version
34-
env:
35-
GITHUB_TOKEN: ${{ inputs.github_token }}
33+
- run: npx semantic-release --dry-run
34+
id: get-next-version
35+
env:
36+
GITHUB_TOKEN: ${{ inputs.github_token }}
3637

37-
- name: create release - beta
38-
if: ${{ github.ref_name == 'main' && inputs.production_release != 'true' }}
39-
env:
40-
GITHUB_TOKEN: ${{ inputs.github_token }}
41-
run: 'npx semantic-release'
42-
shell: bash
38+
- name: create release - beta
39+
if: ${{ github.ref_name == "main" && inputs.production_release != "true" }}
40+
env:
41+
GITHUB_TOKEN: ${{ inputs.github_token }}
42+
run: 'npx semantic-release'
43+
shell: bash
4344

44-
- name: create release - beta
45-
if: ${{ github.ref_name == 'main' && inputs.production_release == 'true' }}
46-
env:
47-
GITHUB_TOKEN: ${{ inputs.github_token }}
48-
run: 'npx semantic-release --branches main'
49-
shell: bash
45+
- name: create release - beta
46+
if: ${{ github.ref_name == "main" && inputs.production_release == "true" }}
47+
env:
48+
GITHUB_TOKEN: ${{ inputs.github_token }}
49+
run: 'npx semantic-release --branches main'
50+
shell: bash
5051

51-
- name: get release ID
52-
id: get-release-id
53-
uses: actions/github-script@v7
54-
if: steps.get-next-version.outputs.new-release-published == 'true'
55-
with:
56-
script: |
57-
const { data } = await github.rest.repos.getReleaseByTag({
58-
owner: context.repo.owner,
59-
repo: context.repo.repo,
60-
tag: "v${{ steps.get-next-version.outputs.new-release-version }}"
61-
})
62-
return data.id
63-
64-
- name: set outputs
65-
id: set-outputs
66-
run: |
67-
echo "{release_published}=${{ steps.get-next-version.outputs.new-release-published }}" >> $GITHUB_OUTPUT
68-
echo "{release_version}=${{ steps.get-next-version.outputs.new-release-version }}" >> $GITHUB_OUTPUT
69-
echo "{release_id}=${{ steps.get-release-id.outputs.result }}" >> $GITHUB_OUTPUT
70-
shell: bash
52+
- name: get release ID
53+
id: get-release-id
54+
uses: actions/github-script@v7
55+
if: steps.get-next-version.outputs.new-release-published == "true"
56+
with:
57+
script: |
58+
const { data } = await github.rest.repos.getReleaseByTag({
59+
owner: context.repo.owner,
60+
repo: context.repo.repo,
61+
tag: "v${{ steps.get-next-version.outputs.new-release-version }}"
62+
})
63+
return data.id
7164
65+
- name: set outputs
66+
id: set-outputs
67+
run: |
68+
echo "{release_published}=${{ steps.get-next-version.outputs.new-release-published }}" >> $GITHUB_OUTPUT
69+
echo "{release_version}=${{ steps.get-next-version.outputs.new-release-version }}" >> $GITHUB_OUTPUT
70+
echo "{release_id}=${{ steps.get-release-id.outputs.result }}" >> $GITHUB_OUTPUT
71+
shell: bash

0 commit comments

Comments
 (0)