Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Revert "behnaz/git action release"" #1728

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 33 additions & 9 deletions .github/workflows/release_production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,51 @@ on:
push:
branches:
- master
env:
RELEASE_TYPE: Production

jobs:
release_production:
environment: Production
runs-on: ubuntu-latest
container:
image: node:18.16.1
outputs:
RELEASE_VERSION: ${{ steps.extract_version.outputs.RELEASE_VERSION }}
steps:
- uses: actions/checkout@v4.0.0
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: "./.github/actions/versioning"
with:
target_branch: production
- uses: "./.github/actions/publish_to_pages_production"
with:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
- uses: technote-space/workflow-conclusion-action@45ce8e0eb155657ab8ccf346ade734257fd196a5
- name: Extract version
run: echo "VERSION=$(echo cat public/version)"
- uses: "./.github/actions/send_slack_notification"
with:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
status: ${{ env.WORKFLOW_CONCLUSION }}
release_type: Production
version: $VERSION
id: extract_version
run: echo "RELEASE_VERSION=$(echo cat public/version)" >> $GITHUB_OUTPUT

send_slack_notification:
environment: Production
runs-on: ubuntu-latest
steps:
- name: Conclusion
uses: technote-space/workflow-conclusion-action@45ce8e0eb155657ab8ccf346ade734257fd196a5
- name: Create Slack Message
id: create_slack_message
env:
RELEASE_VERSION: ${{ needs.release_production.outputs.RELEASE_VERSION }}
run: |
if [ $WORKFLOW_CONCLUSION == "success" ]; then
echo "MESSAGE=$RELEASE_TYPE Release succeeded for static.deriv.com with version $RELEASE_VERSION" >> $GITHUB_OUTPUT
else
echo "MESSAGE=$RELEASE_TYPE Release failed for static.deriv.com with version $RELEASE_VERSION" >> $GITHUB_OUTPUT
fi
- name: Send Slack Notification
uses: "deriv-com/shared-actions/.github/actions/send_slack_notification@master"
with:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
status: ${{ env.WORKFLOW_CONCLUSION }}
release_type: Production
version: ${{ needs.release_production.outputs.RELEASE_VERSION }}
MESSAGE: ${{ step.outputs.create_slack_message.MESSAGE }}
Loading