Skip to content

Experiment with gnu-sed #5

Experiment with gnu-sed

Experiment with gnu-sed #5

Workflow file for this run

name: Experiment with gnu-sed
on:
workflow_dispatch:
inputs:
version:
type: string
description: With V
env:
APP_ID: 251311
FULL_VERSION: ${{ github.event.release.tag_name }}
jobs:
post-release:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.version != '' }}
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 ${{github.ref_name}} | 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\
eh\\
\\
ha\\
}" CHANGELOG.md
sed -i "/^Initial beta release.$/ {
N;
a\
[Unreleased]: https://github.com/bufbuild/buf/compare/${{github.event.inputs.version}}...HEAD
}" CHANGELOG.md
- name: create PR
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38
with:
add-paths: .
commit-message: "test sed"
branch: next/${{env.NEXT_VERSION}}
delete-branch: true
base: main
title: "test sed"
body: just testing
token: ${{ secrets.GITHUB_TOKEN }}