Skip to content

Commit from GitHub Actions (Bump package version) #18

Commit from GitHub Actions (Bump package version)

Commit from GitHub Actions (Bump package version) #18

Workflow file for this run

name: Bump package version
on:
push:
branches:
- 'main'
jobs:
bump_package_version:
name: "Bump package version"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: '0'
submodules: recursive
token: ${{ secrets.API_TOKEN_GITHUB }}
- name: "Get new version"
id: get_new_version
uses: anothrNick/github-tag-action@1.67.0
env:
GITHUB_TOKEN: ${{ secrets.API_TOKEN_GITHUB }}
DEFAULT_BUMP: none
WITH_V: false
DRY_RUN: true
BRANCH_HISTORY: 'last'
DEFAULT_BRANCH: 'main'
- name: "Update version in project"
uses: jacobtomlinson/gha-find-replace@v3
if: ${{ steps.get_new_version.outputs.new_tag }}
with:
include: PGCG.commonItems.SourceGenerators/PGCG.commonItems.SourceGenerators.csproj
find: <Version>${{ steps.get_new_version.outputs.old_tag }}</Version>
replace: <Version>${{ steps.get_new_version.outputs.new_tag }}</Version>
regex: false
- name: "Push changes"
uses: EndBug/add-and-commit@v9
if: ${{ steps.get_new_version.outputs.new_tag }}
with:
default_author: github_actions