Skip to content

Merge pull request #432 from tiiuae/autocreate-version-file #1

Merge pull request #432 from tiiuae/autocreate-version-file

Merge pull request #432 from tiiuae/autocreate-version-file #1

Workflow file for this run

name: Version File
on:
push:
branches:
- main
- develop
jobs:
version-file:
runs-on: ubuntu-latest
permissions:
contents: write
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop'
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Create VERSION file
run: |
{
echo GIT_SHA=$GITHUB_SHA
echo EPOCH_TIMESTAMP=$(date +%s)
echo PRECISE_DATE_TIMESTAMP=\"$(date "+%Y-%m-%d - %H:%M:%S.%N")\"
} > VERSION
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: 'Update VERSION'
disable_globbing: true
file_pattern: VERSION