Skip to content

Update peter-evans/create-pull-request action to v8 #29

Update peter-evans/create-pull-request action to v8

Update peter-evans/create-pull-request action to v8 #29

Workflow file for this run

name: release
on:
push:
branches:
- master
tags:
- 'v*.*.*'
pull_request:
types:
- labeled
jobs:
release:
if: github.event.action != 'labeled'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
# Bump version on merging Pull Requests with specific labels.
# (bump:major,bump:minor,bump:patch)
- id: bumpr
if: "!startsWith(github.ref, 'refs/tags/')"
uses: haya14busa/action-bumpr@78ab5a104d20896c9c9122c64221b3aecf1a8cbb # v1.10.0
# Update corresponding major and minor tag.
# e.g. Update v1 and v1.2 when releasing v1.2.3
- uses: haya14busa/action-update-semver@fb48464b2438ae82cc78237be61afb4f461265a1 # v1.2.1
if: "!steps.bumpr.outputs.skip"
with:
tag: ${{ steps.bumpr.outputs.next_version }}
# Get tag name.
- id: tag
uses: haya14busa/action-cond@94f77f7a80cd666cb3155084e428254fea4281fd # v1.2.1
with:
cond: "${{ startsWith(github.ref, 'refs/tags/') }}"
if_true: ${{ github.ref }}
if_false: ${{ steps.bumpr.outputs.next_version }}
# Create release.
- uses: shogo82148/actions-create-release@23f53983720ef0c8c73db148582eba2cb49c58cd # v1.7.6
if: "steps.tag.outputs.value != ''"
with:
# This token is provided by Actions, you do not need to create your own token
github_token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ steps.tag.outputs.value }}
release_name: Release ${{ steps.tag.outputs.value }}
body: ${{ steps.bumpr.outputs.message }}
draft: false
prerelease: false
release-check:
if: github.event.action == 'labeled'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: Post bumpr status comment
uses: haya14busa/action-bumpr@78ab5a104d20896c9c9122c64221b3aecf1a8cbb # v1.10.0