Skip to content

Commit

Permalink
fix: release files & publish env
Browse files Browse the repository at this point in the history
  • Loading branch information
ufukbakan committed Aug 6, 2024
1 parent 95eb6fa commit 2f9915d
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
#
name: "Node build, release & publish"

on:
workflow_call
on: workflow_call

jobs:
publish-npm:
Expand All @@ -22,22 +21,25 @@ jobs:
- name: Get version
id: get-version
run: |
VERSION=$(jq -r '.version' package.json)
TITLE="Release v$VERSION" # Customize title format if needed
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "title=$TITLE" >> $GITHUB_OUTPUT
VERSION=$(jq -r '.version' package.json)
TITLE="Release v$VERSION" # Customize title format if needed
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "title=$TITLE" >> $GITHUB_OUTPUT
- name: Peek title
run: |
echo "Title is"
echo ${{steps.get-version.outputs.title}}
echo "Title is"
echo ${{steps.get-version.outputs.title}}
- name: Automatic Releases
uses: marvinpinto/action-automatic-releases@latest
with:
automatic_release_tag: stable
repo_token: ${{ secrets.GITHUB_TOKEN }}
prerelease: false
title: ${{steps.get-version.outputs.title}}
files: "*.tar"
- run: npm publish
files: |
*.tar
*.tgz
- name: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
run: npm publish

0 comments on commit 2f9915d

Please sign in to comment.