Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
cotestatnt committed Jan 7, 2024
2 parents d59bd5a + 20aa2a5 commit c8d60ff
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/versioning.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Set Lib Version
on:
push:
branches: [ master ]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Required due to the way Git works
- name: 'Get tag'
id: previoustag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
with:
fallback: 1.0.0 # Optional fallback tag to use when no tag can be found
- name: Overwrite version.h
uses: "DamianReeves/write-file-action@master"
with:
path: version.h
write-mode: overwrite
contents: |
const char* getVersion() {return "${{ steps.previoustag.outputs.tag }}";}
- name: Commit & Push
uses: Andro999b/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: master
force: true
message: 'Overwritten by Github Actions - ${date}'

0 comments on commit c8d60ff

Please sign in to comment.