Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
f31c59da5b | |||
3293ac0d53 | |||
bba8af2b06 | |||
c3b5470f6f | |||
e95a08b87e | |||
049ea70bb3 |
10
.github/workflows/publish.yml
vendored
10
.github/workflows/publish.yml
vendored
@ -15,6 +15,7 @@ jobs:
|
||||
|
||||
create_release:
|
||||
name: Create Release
|
||||
needs: test
|
||||
uses: luketainton/gha-workflows/.github/workflows/create-release.yml@main
|
||||
|
||||
build:
|
||||
@ -29,14 +30,11 @@ jobs:
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
- name: Update pyproject.toml
|
||||
run:
|
||||
prefix="v"
|
||||
string="${{ needs.create_release.outputs.release_name }}"
|
||||
versionname=${string#"$prefix"}
|
||||
sed -i "s@version = \"0.0.0\"@version = \"${versionname}\"@g" pyproject.toml
|
||||
- name: Setup Poetry
|
||||
uses: abatilo/actions-poetry@v3
|
||||
- name: Update pyproject.toml
|
||||
run:
|
||||
./tools/update_pyproject.sh ${{ needs.create_release.outputs.release_name }}
|
||||
- name: Install dependencies
|
||||
run: poetry install
|
||||
- name: Build wheel file
|
||||
|
9
tools/update_pyproject.sh
Executable file
9
tools/update_pyproject.sh
Executable file
@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
OLD_VERSION=$(grep ^version pyproject.toml | cut -d '"' -f 2)
|
||||
echo "OLD_VERSION: $OLD_VERSION"
|
||||
OLD_VERSION="\"$OLD_VERSION\""
|
||||
NEW_VERSION=$(echo "$1" | cut -d '"' -f 2 | cut -d 'v' -f 2)
|
||||
echo "NEW_VERSION: $NEW_VERSION"
|
||||
NEW_VERSION="\"$NEW_VERSION\""
|
||||
sed -i "s+version = $OLD_VERSION+version = $NEW_VERSION+g" pyproject.toml
|
Reference in New Issue
Block a user