Skip to content

Instantly share code, notes, and snippets.

@surendra-wal
Last active November 26, 2023 18:10
Show Gist options
  • Save surendra-wal/5408bdaaa53fee815c512b41a8dfef2d to your computer and use it in GitHub Desktop.
Save surendra-wal/5408bdaaa53fee815c512b41a8dfef2d to your computer and use it in GitHub Desktop.
release.yml
name: Release
on:
push:
branches:
- release
- main
jobs:
release:
name: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: npm
node-version: 18.17.1
- run: yarn install --frozen-lockfile
- run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.TODO_GITHUB_TOKEN }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
CURRENT_BRANCH: ${{ github.ref_name }}
backmerge-release:
needs: release
if: endsWith(github.ref, '/release')
uses: ./.github/workflows/backmerge_to_lower_branch.yml
name: Backmerge release
with:
BRANCH_TO_UPDATE: dev
secrets:
TODO_GITHUB_TOKEN: ${{ secrets.TODO_GITHUB_TOKEN }}
backmerge-main:
needs: release
if: endsWith(github.ref, '/main')
uses: ./.github/workflows/backmerge_to_release_branch_or_dev.yml
name: Backmerge main
secrets:
TODO_GITHUB_TOKEN: ${{ secrets.TODO_GITHUB_TOKEN }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment