Skip to content

Commit

Permalink
change url variable
Browse files Browse the repository at this point in the history
  • Loading branch information
ivegabr committed Jan 13, 2025
1 parent 2a4cf5d commit c12a160
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions .github/workflows/publish_npm.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
name: Deploy library on NPM

# on:
# release:
# types: [created, edited, published]

on:
release:
types: [created, edited, published]
push:
branches:
- fix/npm-workflow


# Declare default permissions as read only.
permissions: read-all
Expand Down Expand Up @@ -30,9 +36,18 @@ jobs:
run: |
echo PACKAGE_NAME=$(cat package.json | jq -r .name | cut -f2 -d"\"" | cut -f2 -d"@") >> $GITHUB_OUTPUT
echo PACKAGE_VERSION="refs/tags/v"$(cat package.json | jq -r .version) >> $GITHUB_OUTPUT
echo PACKAGE_REPOSITORY=$(cat package.json | jq -r .repository.url | sed 's/git+//') >> $GITHUB_OUTPUT
echo PACKAGE_REPOSITORY=$(cat package.json | jq -r .repository.url | sed 's/\+https//') >> $GITHUB_OUTPUT
id: get_package_info

- name: Print outputs for debugging
run: |
echo "GitHub Repository: ${{ github.repository }}"
echo "Package Name: ${{ steps.get_package_info.outputs.PACKAGE_NAME }}"
echo "Github Tag: ${{ github.ref }}"
echo "Package Version: ${{ steps.get_package_info.outputs.PACKAGE_VERSION }}"
echo "GitHub Repository URL: ${{ github.repositoryUrl }}"
echo "Package Repository: ${{ steps.get_package_info.outputs.PACKAGE_REPOSITORY }}"
- name: Check if package_name matches with repository name
if: github.repository != steps.get_package_info.outputs.PACKAGE_NAME
# Fail if package name not properly configured
Expand Down

0 comments on commit c12a160

Please sign in to comment.