Skip to content

Bump slackapi/slack-github-action from 1.23.0 to 1.26.0 #2

Bump slackapi/slack-github-action from 1.23.0 to 1.26.0

Bump slackapi/slack-github-action from 1.23.0 to 1.26.0 #2

name: Publish new github release
on:
pull_request:
branches:
- master
types:
- closed
jobs:
release:
name: Publish new release
runs-on: ubuntu-latest
if: startsWith(github.event.pull_request.head.ref, 'release/') && github.event.pull_request.merged == true # only merged pull requests must trigger this job
steps:
- name: Extract version from branch name (for release branches)
id: extract-version
run: |
BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
VERSION=${BRANCH_NAME#release/}
echo "release_version=$VERSION" >> $GITHUB_OUTPUT
- name: Checkout source branch
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set Node 16
uses: actions/setup-node@v3
with:
node-version: 16
- name: Create Github Release
id: create_release
env:
HUSKY: 0
GITHUB_TOKEN: ${{ secrets.PAT }}
CONVENTIONAL_GITHUB_RELEASER_TOKEN: ${{ secrets.PAT }}
run: |
npx conventional-github-releaser -p angular
- name: Delete release branch
uses: koj-co/delete-merged-action@master
if: startsWith(github.event.pull_request.head.ref, 'release/')
with:
branches: 'release/*'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}