Skip to content
Snippets Groups Projects
Unverified Commit 2ffef477 authored by Brent Huisman's avatar Brent Huisman Committed by GitHub
Browse files

Fudge version in pyproject.toml for ci (#2200)

Result: https://github.com/brenthuisman/arbor/actions/runs/5800177883

Fixes #2172
parent 46d6e658
No related branches found
No related tags found
No related merge requests found
......@@ -12,7 +12,7 @@ on:
jobs:
get_timestamp:
name: Prep VERSION
name: Prep pyproject.toml
runs-on: ubuntu-latest
steps:
......@@ -20,13 +20,13 @@ jobs:
uses: actions/checkout@v3
with:
submodules: recursive
- name: Create unique VERSION
- name: Create unique version in pyproject.toml
if: startsWith(github.ref, 'refs/tags/v') == false
run: python3 -c 'import time;f=open("VERSION","r+");content = f.readlines();f.seek(0);f.write(content[0].strip()+time.strftime("%Y%m%d%H%I%S"))'
run: python3 -c 'import time;f=open("pyproject.toml","r+");c = f.readlines();d=[i.split("#")[0].strip()[:-1]+time.strftime("%Y%m%d%H%I%S")+"\"\n" if i.startswith("version") else i for i in c];f.seek(0);f.writelines(d);f.truncate()'
- uses: actions/upload-artifact@v3
with:
name: arbver
path: ${{ github.workspace }}/VERSION
path: ${{ github.workspace }}/pyproject.toml
build_binary_wheels:
name: Build wheels on ${{ matrix.os }}
......@@ -41,14 +41,14 @@ jobs:
uses: actions/checkout@v3
with:
submodules: recursive
- name: Delete VERSION
run: rm -f VERSION
- name: Get VERSION
- name: Delete pyproject.toml
run: rm -f pyproject.toml
- name: Get pyproject.toml
uses: actions/download-artifact@v3
with:
name: arbver
- name: Check VERSION
run: cat VERSION
- name: Check pyproject.toml
run: cat pyproject.toml
- name: Install cibuildwheel
run: python3 -m pip install cibuildwheel
- name: Build wheels
......@@ -72,14 +72,14 @@ jobs:
uses: actions/checkout@v3
with:
submodules: recursive
- name: Delete VERSION
run: rm -f VERSION
- name: Get VERSION
- name: Delete pyproject.toml
run: rm -f pyproject.toml
- name: Get pyproject.toml
uses: actions/download-artifact@v3
with:
name: arbver
- name: Check VERSION
run: cat VERSION
- name: Check pyproject.toml
run: cat pyproject.toml
- name: Make sdist
run: python3 -m build -s
- name: Install sdist
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment