chore(deps): lock file maintenance #461
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: release | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- 'v*.*.*' | |
permissions: | |
contents: write | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
# Bump version on merging Pull Requests with specific labels. | |
# (bump:major,bump:minor,bump:patch) | |
- name: Bump version | |
id: bumpr | |
if: "!startsWith(github.ref, 'refs/tags/')" | |
uses: haya14busa/action-bumpr@v1 | |
# Update corresponding major and minor tag. | |
# e.g. Update v1 and v1.2 when releasing v1.2.3 | |
- name: Update semver | |
uses: haya14busa/action-update-semver@v1 | |
if: "!steps.bumpr.outputs.skip" | |
with: | |
tag: ${{ steps.bumpr.outputs.next_version }} | |
# Get tag name. | |
- name: Tag check | |
id: tag | |
uses: haya14busa/action-cond@v1 | |
with: | |
cond: "${{ startsWith(github.ref, 'refs/tags/') }}" | |
if_true: ${{ github.ref }} | |
if_false: ${{ steps.bumpr.outputs.next_version }} | |
# Create release. | |
- name: Create release | |
uses: softprops/action-gh-release@v2 | |
if: "steps.tag.outputs.value != ''" | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
name: Release ${{ steps.tag.outputs.value }} | |
body: ${{ steps.bumpr.outputs.message }} | |
tag_name: ${{ steps.tag.outputs.value }} | |
draft: false | |
prerelease: false |