Skip to content

Commit

Permalink
Merge pull request #95 from deriv-com/niloofar/get-version-github-action
Browse files Browse the repository at this point in the history
ci: extract the release version
  • Loading branch information
niloofar-deriv authored Feb 14, 2024
2 parents ce8b405 + cfc2bf6 commit e7cb400
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
outputs:
RELEASE_VERSION: ${{ steps.extract_version.outputs.RELEASE_VERSION }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -43,7 +45,7 @@ jobs:
run: npx semantic-release
- name: Extract Version
id: extract_version
run: npm run app:version
run: echo "RELEASE_VERSION=$(echo $npm_package_version)" >> $GITHUB_OUTPUT
- name: Trigger Quill Icons Park release
if: success()
env:
Expand All @@ -70,9 +72,9 @@ jobs:
id: create_slack_message
run: |
if [ "${{ env.WORKFLOW_CONCLUSION }}" == "success" ]; then
echo "MESSAGE=${{ env.RELEASE_TYPE }} ✅ The release for @deriv/quill-icons was successful, and the new version (${{ steps.extract_version.outputs }}) is now available." >> $GITHUB_OUTPUT
echo "MESSAGE=${{ env.RELEASE_TYPE }} ✅ The release for @deriv/quill-icons was successful, and the new version (${{ needs.release.outputs.RELEASE_VERSION }}) is now available." >> $GITHUB_OUTPUT
else
echo "MESSAGE=${{ env.RELEASE_TYPE }} 🤨 The release attempt for @deriv/quill-icons with version ${{ steps.extract_version.outputs }} was unsuccessful." >> $GITHUB_OUTPUT
echo "MESSAGE=${{ env.RELEASE_TYPE }} 🤨 The release attempt for @deriv/quill-icons with version ${{ needs.release.outputs.RELEASE_VERSION }} was unsuccessful." >> $GITHUB_OUTPUT
fi
- name: Send Slack Notification
uses: './.github/actions/send_slack_notifications'
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@
"format": "prettier --write . --config ./.prettierrc",
"allIconsNames": "cd ./src/react && tree -J > allIconsNames.ts && bash -c 'echo -e \"export const allIconsNames = $(cat allIconsNames.ts)\" > allIconsNames.ts'",
"prepare": "husky install",
"prepublish": "npm run build",
"app:version": "echo $npm_package_version"
"prepublish": "npm run build"
},
"keywords": [],
"devDependencies": {
Expand Down

0 comments on commit e7cb400

Please sign in to comment.