forked from bufbuild/buf
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (54 loc) · 1.7 KB
/
unrelease.yaml
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
50
51
52
53
54
55
56
57
name: Back to Development
on:
workflow_dispatch:
inputs:
version:
type: string
description: Don't use it yet.
release:
types: [published]
env:
FULL_VERSION: ${{ github.event.release.tag_name }}
jobs:
post-release:
runs-on: ubuntu-latest
# TODO: can this be removed?
outputs:
version: ${{ steps.output_version.outputs.version }}
steps:
- name: Checkout repository code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set NEXT VERSION variable from tag
run: |
NEXT_VERSION=$(echo ${{ env.FULL_VERSION }} | awk -F. -v OFS=. '{$NF += 1 ; print}')
echo "NEXT_VERSION=${NEXT_VERSION:1}-dev" >> $GITHUB_ENV
- name: update version
run: make updateversion VERSION=${{ env.NEXT_VERSION }}
- name: unrelease changelog
run: |
sed -i "/^# Changelog/ {
N;
a\
## [Unreleased]\\
\\
- No changes yet.\\
}" CHANGELOG.md
sed -i "/^Initial beta release.$/ {
N;
a\
[Unreleased]: https://github.com/bufbuild/buf/compare/${{ env.FULL_VERSION }}...HEAD
}" CHANGELOG.md
# update homebrew badge is skipped here, should it be?
- name: create PR
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38
with:
add-paths: .
commit-message: "Back to development"
branch: next/${{ env.NEXT_VERSION }}
delete-branch: true
base: main
title: "Return to development"
body: Release complete for ${{ env.FULL_VERSION }}
token: ${{ secrets.GITHUB_TOKEN }}