Skip to content

Pat rules (#191)

Pat rules (#191) #93

Workflow file for this run

name: "Update Version"
on:
push:
branches: ["main"]
workflow_dispatch:
# manual workflow
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
versioning:
name: Versioning
runs-on: ubuntu-latest
permissions:
actions: read
contents: write
security-events: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
token: ${{ secrets.PAT_TOKEN }}
- name: setup .net core
uses: actions/setup-dotnet@v1
with:
dotnet-version: "8.0.x"
- name: install gitversion
uses: gittools/actions/gitversion/setup@v0
with:
versionspec: "5.x"
- name: Use GitVersion
id: gitversion
uses: gittools/actions/gitversion/execute@v0
- name: Create version file
run: |
echo "Version: ${{ steps.gitversion.outputs.majorMinorPatch }}" > version.txt
- name: Commit
run: |
git remote set-url origin https://github-actions[bot]:${PAT}@github.com/henne49/dbus-opendtu.git
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add version.txt
git commit -m "Update version [skip ci] "
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.PAT_TOKEN }}
repository: henne49/dbus-opendtu
force_with_lease: true