-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (30 loc) · 990 Bytes
/
release.yml
File metadata and controls
35 lines (30 loc) · 990 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Release
on:
pull_request:
types: [closed]
branches:
- master
jobs:
release:
name: 🚀 Release
if: github.event.pull_request.merged && startsWith(github.head_ref, 'release-')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/github-script@v7
with:
script: |
// Getting the release version from the PR source branch
// Source branch looks like this: release-1.0.0
const version = context.payload.pull_request.head.ref.split('-')[1]
core.exportVariable('VERSION', version)
- name: Create release on GitHub
uses: ncipollo/release-action@v1
with:
tag: ${{ env.VERSION }}
token: ${{ secrets.GITHUB_TOKEN }}
body: |
Release ${{ env.VERSION }}
Install with: `composer require getstream/getstream-php:^${{ env.VERSION }}`