Skip to content

Commit

Permalink
chore: fix workflow issue
Browse files Browse the repository at this point in the history
  • Loading branch information
prince-deriv committed Dec 16, 2024
1 parent 8fffc32 commit aff31ce
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions .github/workflows/publish_package.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release Packages
name: Publish Packages

on:
push:
Expand All @@ -16,40 +16,46 @@ jobs:
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11

- name: Set up Node.js
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8
uses: actions/setup-node@3e9b95f53d189266c2d3828f91d3a4477ab163d3
with:
node-version: '20'
- name: Install dependencies
run: npm install


- name: Check changes in marketing-scripts
id: marketing-changes
run: |
if git diff --quiet HEAD^ HEAD -- public/scripts/marketing-scripts/src/; then
echo "No changes in marketing-scripts"
echo "changed=false" >> $GITHUB_ENV
else
echo "Changes detected in marketing-scripts"
echo "changed=true" >> $GITHUB_ENV
fi
continue-on-error: true


- name: Check changes in cs-scripts
id: cs-changes
run: |
if git diff --quiet HEAD^ HEAD -- public/scripts/cs-scripts/src/; then
echo "No changes in cs-scripts"
echo "changed=false" >> $GITHUB_ENV
else
echo "Changes detected in cs-scripts"
echo "changed=true" >> $GITHUB_ENV
fi
continue-on-error: true

- name: Release marketing-scripts

- name: Install dependencies and build marketing-scripts
if: ${{ env.changed == 'true' && steps.marketing-changes.outputs.changed == 'true' }}
working-directory: public/scripts/marketing-scripts
run: npx semantic-release
run: |
npm install
npm run build
npx semantic-release
- name: Release cs-scripts
- name: Install dependencies and build cs-scripts
if: ${{ env.changed == 'true' && steps.cs-changes.outputs.changed == 'true' }}
working-directory: public/scripts/cs-scripts
run: npx semantic-release
run: |
npm install
npm run build
npx semantic-release

0 comments on commit aff31ce

Please sign in to comment.