From b16cfb5bf500b4a0e8bd0f3831aed39b9c742c63 Mon Sep 17 00:00:00 2001 From: tcevaer Date: Mon, 30 Oct 2023 10:03:45 +0100 Subject: [PATCH] Added new GITHUB workflow to generate version file --- .github/workflows/gen_version.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/gen_version.yml diff --git a/.github/workflows/gen_version.yml b/.github/workflows/gen_version.yml new file mode 100644 index 0000000..f80cbf4 --- /dev/null +++ b/.github/workflows/gen_version.yml @@ -0,0 +1,22 @@ +name: Generate version file + +on: + push: + tags: + - '*' + +jobs: + generate_version: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + + - name: Install setuptools_scm + run: pip install setuptools_scm + + - name: Write version to file + run: python -c "import setuptools_scm; print(f'__version__ = \\'{setuptools_scm.get_version()}\\'', file=open('coloc_sat/version.py', 'w'))" +