2020-08-18 12:02:31 +02:00
|
|
|
name: Version Update
|
|
|
|
|
|
|
|
on:
|
2020-08-18 12:11:42 +02:00
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- '*.**'
|
2020-08-18 12:02:31 +02:00
|
|
|
|
|
|
|
jobs:
|
2020-08-18 12:11:42 +02:00
|
|
|
update-version:
|
|
|
|
name: Update VERSION
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout repo
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
ref: master
|
|
|
|
fetch-depth: 0
|
2020-08-18 12:02:31 +02:00
|
|
|
|
2020-08-18 12:11:42 +02:00
|
|
|
- name: Edit version.py
|
2021-06-17 00:22:23 +02:00
|
|
|
if: github.repository == 'PostHog/posthog'
|
2020-08-18 19:09:42 +02:00
|
|
|
run: echo "VERSION = \"$(git describe --tags `git rev-list --tags --max-count=1`)\"" > posthog/version.py
|
2020-08-18 12:11:42 +02:00
|
|
|
|
|
|
|
- name: Commit update
|
2021-06-17 00:22:23 +02:00
|
|
|
if: github.repository == 'PostHog/posthog'
|
2020-08-18 12:11:42 +02:00
|
|
|
uses: stefanzweifel/git-auto-commit-action@v4
|
|
|
|
with:
|
|
|
|
commit_message: 'Update VERSION'
|
|
|
|
commit_user_name: PostHog Bot
|
|
|
|
commit_user_email: hey@posthog.com
|
|
|
|
commit_author: PostHog Bot <hey@posthog.com>
|