Skip to content

Commit ecfff50

Browse files
fix(ci): retrieve new version from package.json
1 parent 87161a1 commit ecfff50

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.github/workflows/actions/publish-npm/action.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@ runs:
3939
git config user.email --global [email protected]
4040
shell: bash
4141
- name: Update Version
42-
run: npm version ${{ inputs.version }}
42+
id: update_version
43+
run: |
44+
npm version ${{ inputs.version }}
45+
echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
4346
shell: bash
4447
working-directory: ${{ inputs.working-directory }}
4548
# - name: Run Build
@@ -64,7 +67,7 @@ runs:
6467
git remote -v
6568
git push origin main --tags
6669
gh auth login --with-token ${{ inputs.ghToken }}
67-
gh release create ${{ inputs.tag }} --title "v${{ inputs.tag }}" --generate-notes
70+
gh release create ${{ steps.update_version.outputs.version }} --title "v${{ steps.update_version.outputs.version }}" --generate-notes
6871
shell: bash
6972
env:
7073
GH_TOKEN: ${{ inputs.ghToken }}

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ jobs:
2626
steps:
2727
- name: Checkout
2828
uses: actions/checkout@v4
29+
with:
30+
token: ${{ secrets.IONITRON_TOKEN }}
2931
- name: Publish to NPM
3032
uses: ./.github/workflows/actions/publish-npm
3133
with:

0 commit comments

Comments
 (0)