Skip to content

Commit

Permalink
Fudge version in pyproject.toml for ci (#2200)
Browse files Browse the repository at this point in the history
  • Loading branch information
brenthuisman authored Aug 9, 2023
1 parent 46d6e65 commit 2ffef47
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/build-pip-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@ on:

jobs:
get_timestamp:
name: Prep VERSION
name: Prep pyproject.toml
runs-on: ubuntu-latest

steps:
- name: Get Arbor
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 }}
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 2ffef47

Please sign in to comment.