v3.9.0 #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Go back to Development | |
on: | |
workflow_dispatch: | |
release: | |
types: [published] | |
jobs: | |
post-release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set RELEASED_VERSION_WITH_V variable from bufcli.go | |
# globbing patterns should be used in the parameter substitution within the echo command, not regex patterns. | |
run: | | |
RELEASED_VERSION_WITH_V=`grep -oE "Version.*=.*\"[0-9]\.[0-9]+\.[0-9]+[^\"]*" private/buf/bufcli/bufcli.go` | |
echo "RELEASED_VERSION_WITH_V=v${RELEASED_VERSION_WITH_V##Version*=*\"}" >> $GITHUB_ENV | |
- name: Print released version | |
run: echo "the version released is ${{ env.RELEASED_VERSION_WITH_V }}" | |
- name: Set NEXT VERSION variable from tag | |
run: | | |
NEXT_VERSION=$(echo ${{ env.RELEASED_VERSION_WITH_V }} | 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.RELEASED_VERSION_WITH_V }}...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.RELEASED_VERSION_WITH_V }} | |
# token: ${{ secrets.GITHUB_TOKEN }} | |
- uses: ./.github/actions/create-pr-action | |
with: | |
branch: next/${{ env.NEXT_VERSION }} | |
commit_message: Back to development | |
title: Return to Development | |
body: Release complete for ${{ env.RELEASED_VERSION_WITH_V }} | |
token: ${{ secrets.GITHUB_TOKEN }} |