Skip to content

Update release.yml

Update release.yml #27

Workflow file for this run

name: Release 🚀
on:
push:
branches:
- edge
- master
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
release-type: node
default-branch: ${{ github.ref_name }}
prerelease: ${{ github.ref_name != 'master' }}
# versioning-strategy: ${{ github.ref_name == 'master' && 'default' || 'prerelease' }}
# The logic below handles the npm publication:
- uses: actions/checkout@v4
# these if statements ensure that a publication only occurs when
# a new release is created:
if: ${{ steps.release.outputs.release_created }}
- uses: actions/setup-node@v4
with:
node-version: '20.x'
if: ${{ steps.release.outputs.release_created }}
- run: npm ci
if: ${{ steps.release.outputs.release_created }}
- run: npm run build-all
if: ${{ steps.release.outputs.release_created }}
- run: npm publish --tag ${{ github.ref_name == 'master' && 'latest' || github.ref_name }}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
if: ${{ steps.release.outputs.release_created }}
# notify:
# runs-on: ubuntu-latest
# needs: ['release']
# if: always() && needs.release.result == 'success'
# steps:
# - name: Slack Notification - Deployment Success
# uses: rtCamp/[email protected]
# env:
# SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
# SLACK_CHANNEL: 'widgets-releases'
# SLACK_COLOR: ${{ job.status }}
# SLACK_TITLE: 'Deployment succeeded'
# SLACK_MESSAGE: 'Success :rocket: cloudinary-video-player version ${{ github.event.inputs.package_version }} deployed successfully'