Skip to content

Get latest release version #99

Get latest release version

Get latest release version #99

Workflow file for this run

name: Get latest release version
on:
schedule:
- cron: '0 2 1 * *'
workflow_dispatch:
inputs:
jobs:
get-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
#with:
# token: ${{ secrets.REPO_SCOPED_TOKEN }}
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18.13'
- name: Install dependencies
run: npm install
- name: Fetch release version
run: npm run get-version
- name: Store Version number in env
run: |
echo "version=$(cat release-version)" >> $GITHUB_ENV
- name: Check for modified files
id: git-check
run: echo ::set-output name=modified::$([ -z "`git status --porcelain`" ] && echo "false" || echo "true")
- name: Commit latest release version
if: steps.git-check.outputs.modified == 'true'
#git config --global user.name 'Julian Jarecki'
#git config --global user.email '[email protected]'
run: |
git config user.name github-actions
git config user.email [email protected]
git commit -am "Release version ${{ env.version }}"
git push