Skip to content

Create release branch #3

Create release branch

Create release branch #3

name: Create release branch
on:
workflow_dispatch:
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
jobs:
createrelease:
name: Create merge release branch
runs-on: ubuntu-latest
if: contains(env.BRANCH_NAME, 'release-app_')

Check failure on line 12 in .github/workflows/create-merge-release-branch.yml

View workflow run for this annotation

GitHub Actions / Create release branch

Invalid workflow file

The workflow is not valid. .github/workflows/create-merge-release-branch.yml (Line: 12, Col: 9): Unrecognized named-value: 'env'. Located at position 10 within expression: contains(env.BRANCH_NAME, 'release-app_')
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Create merge release branch
run: git checkout -b merge/${{ env.BRANCH_NAME }}
- name: Initialize mandatory git config
run: |
git config user.name "Tangem Bot"
git config user.email [email protected]
- name: Commit and push changes
run: |
git add .
git commit -m "Merge release branch ${{ env.BRANCH_NAME }} into develop"
git fetch origin develop
git merge develop
git push origin merge/${{ env.BRANCH_NAME }}
- uses: actions/github-script@v4
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.pulls.create({
owner: context.repo.owner,
repo: context.repo.repo,
head: "merge/${{ env.BRANCH_NAME }}",
base: "develop",
title: "Merge branch ${{ env.BRANCH_NAME }} into develop",
});
- name: Slack notification
if: always()
uses: adamkdean/simple-slack-notify@master
with:
channel: '#development-android'
status: ${{ job.status }}
success_text: 'Blockchain SDK: Merge branch to develop has been created'
failure_text: 'Blockchain SDK: Fail to create merge branch'
cancelled_text: 'Blockchain SDK: task merge release cancelled'
fields: |
[{"title": "Source Branch", "value": "${{ steps.extract_branch.outputs.branch }}"},
{"title": "Merge Branch", "value": "merge/${{ env.BRANCH_NAME }},
{"title": "Initiator", "value": "${{ github.actor }}"},
{"title": "Action URL", "value": "${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}"}]
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_DVELOPMENT_ANDROID }}