-
Notifications
You must be signed in to change notification settings - Fork 576
49 lines (43 loc) · 1.7 KB
/
prepare-release.yml
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Prepare Release
on:
workflow_dispatch:
inputs:
version:
description: Use this to provide a version, instead of deriving it from the changelog.
required: false
type: string
branch:
description: Use this to provide a branch, instead of the default main branch.
required: false
type: string
default: main
jobs:
prepare-release:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
# action is at https://github.com/realm/ci-actions/tree/main/update-changelog
- name: Update Changelog
id: update-changelog
uses: realm/ci-actions/update-changelog@main
with:
version: ${{ inputs.version }}
changelog: ${{ github.workspace }}/CHANGELOG.md
- name: Update version
run: npm version ${{ steps.update-changelog.outputs.new-version }} --workspace realm
- name: Create Release PR
uses: peter-evans/[email protected]
id: create-pr
with:
branch: release/${{ steps.update-changelog.outputs.new-version }}
title: Prepare for ${{ steps.update-changelog.outputs.new-version }}
body: An automated PR for next release.
commit-message: "[${{ steps.update-changelog.outputs.new-version }}] Bump version"
token: ${{ secrets.REALM_CI_PAT }}
assignees: ${{ github.event.sender.login }}
labels: no-jira-ticket
- name: Update summary
run: echo "Created [PR for v${{ steps.update-changelog.outputs.new-version }}](${{ steps.create-pr.outputs.pull-request-url }})" >> $GITHUB_STEP_SUMMARY