Skip to content

feat(release): independent releases for public shared actions #12

feat(release): independent releases for public shared actions

feat(release): independent releases for public shared actions #12

Workflow file for this run

name: CI
on:
pull_request:
branches: [ main ]
push:
branches: [ main ]
workflow_dispatch:
permissions:
contents: read
pull-requests: read
jobs:
setup-and-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9
run_install: false
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Install Dependencies
run: |
pnpm install --frozen-lockfile
- name: Commit lint
uses: wagoid/commitlint-github-action@v5
with:
failOnWarnings: true
- name: Run ESLint
run: pnpm lint
slack_notification:
name: Slack Notification
runs-on: ubuntu-latest
needs: setup-and-lint
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
# Success Notification
- name: Send Success Slack Notification
if: ${{ needs.setup-and-lint.result == 'success' }}
uses: ./slack-actions/workflow-notification
with:
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL_NOTIFY_PUBLIC_SHARED_ACTIONS }}
status: success
success-message: ":white_check_mark: ${{ github.workflow }} workflow successfully ran within ${{ github.repository }}"
# Failure Notification
- name: Send Failure Slack alert
if: ${{ needs.setup-and-lint.result == 'failure' }}
uses: ./slack-actions/workflow-notification
with:
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL_ALERT_PUBLIC_SHARED_ACTIONS }}
status: failure
failure-message: ":x: This is a *failure* notification from ${{ github.repository }} for workflow ${{ github.workflow }}"