This repository has been archived by the owner on May 15, 2024. It is now read-only.
Merge pull request #9 from SAP/ffl-decoupled #8
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
# SPDX-FileCopyrightText: 2023 SAP SE | |
# | |
# SPDX-License-Identifier: Apache-2.0 | |
# | |
# This file is part of FEDEM - https://openfedem.org | |
name: Bump build number | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
bump-build-no: | |
if: github.event.commits[0].author.name != 'github-actions' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out source code repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.ACCESS_PAT }} | |
- name: Bump build number | |
run: | | |
echo "VERSION=$(awk -F. '{$NF++;print}' OFS=. < cfg/VERSION)" >> $GITHUB_ENV | |
echo "BUILDNO=$(awk -F. '{print $NF+1}' < cfg/VERSION)" >> $GITHUB_ENV | |
- name: Update VERSION files | |
run: | | |
echo $VERSION > cfg/VERSION | |
sed -i "/VERSION /s/,[0-9]*$/,$BUILDNO/;/Version\",/s/\.[0-9]\"$/.$BUILDNO\"/" src/vpmUI/Icons/win32AppIcon/fedem_app_icon.rc | |
sed -i "/SET INST_DIR/s/[1-9][0-9]*\.[0-9]*\.[0-9]*/$VERSION/" Install/createInstaller.bat | |
- name: Push updated VERSION files | |
run: | | |
git config user.name github-actions | |
git config user.email [email protected] | |
git commit -m"chore(version): build number $VERSION" cfg src Install | |
git push origin HEAD |