Skip to content

Merge pull request #132 from deriv-com/niloo/fix-security-issue #158

Merge pull request #132 from deriv-com/niloo/fix-security-issue

Merge pull request #132 from deriv-com/niloo/fix-security-issue #158

Workflow file for this run

name: Release
on:
push:
branches:
- main
- beta
- next
- '^([0-9]|[1-9][0-9]*)\.([0-9]|[1-9][0-9]*)\.([0-9]|[1-9][0-9]*|x)'
permissions:
contents: read # for checkout
jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write # to be able to publish a GitHub release
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
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.CI_GITHUB_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 'lts/*'
- name: Install dependencies
run: npm clean-install
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
if: success()
run: npm audit signatures
- name: Release
if: success()
env:
CI: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN}}
run: npx semantic-release
- name: Extract Version
id: extract_version
run: |
PACKAGE_VERSION=$(node -p "require('./package.json').version")
echo "RELEASE_VERSION=${PACKAGE_VERSION}" >> "$GITHUB_OUTPUT"
- name: Trigger Quill Icons Park release
if: success()
env:
QUILL_ICONS_PARK_WORK_FLOW_FILE: 'pr_to_inform_quill_icons_update.yaml'
run: |
curl \
-X POST \
-H "Authorization: token ${{ secrets.CI_GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/${{github.repository}}/actions/workflows/$QUILL_ICONS_PARK_WORK_FLOW_FILE/dispatches \
-d '{"ref":"main"}'
- name: Send Release Slack notification
uses: slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001 # v1.25.0
with:
# For posting a rich message using Block Kit
payload: |
{
"text": "@deriv/quill-icons",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "@deriv/quill-icons@v${{ steps.extract_version.outputs.RELEASE_VERSION }} release: ${{ job.status }}"
}
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK