ci: Use the new make upgrade-version target to manage versions

This commit is contained in:
Christian Decker 2022-08-25 17:22:00 +02:00
parent 8ae0af7962
commit 4693803c35

View File

@ -24,14 +24,15 @@ jobs:
WORKDIR: contrib/pyln-testing
- PACKAGE: pyln-proto
WORKDIR: contrib/pyln-proto
- PACKAGE: pyn-bolt1
WORKDIR: contrib/pyln-spec/bolt1/
- PACKAGE: pyn-bolt2
WORKDIR: contrib/pyln-spec/bolt2/
- PACKAGE: pyn-bolt4
WORKDIR: contrib/pyln-spec/bolt4/
- PACKAGE: pyn-bolt7
WORKDIR: contrib/pyln-spec/bolt7/
# Bolt packages are handled differently
#- PACKAGE: pyn-bolt1
# WORKDIR: contrib/pyln-spec/bolt1/
#- PACKAGE: pyn-bolt2
# WORKDIR: contrib/pyln-spec/bolt2/
#- PACKAGE: pyn-bolt4
# WORKDIR: contrib/pyln-spec/bolt4/
#- PACKAGE: pyn-bolt7
# WORKDIR: contrib/pyln-spec/bolt7/
steps:
- uses: actions/checkout@master
with:
@ -47,13 +48,17 @@ jobs:
run: >-
python -m pip install build poetry --user
- name: Check version tag
run: >-
git describe --always --dirty=-modded --abbrev=7
- name: Build a binary wheel and a source tarball
env:
WORKDIR: ${{ matrix.WORKDIR }}
run: |
export VERSION=$(git describe --abbrev=0).post$(git describe --abbrev=1 | awk -F "-" '{print $2}')
cd ${{ env.WORKDIR}}
poetry version $VERSION
make upgrade-version NEW_VERSION=$VERSION
poetry build
- name: Publish distribution 📦 to Test PyPI
@ -74,6 +79,6 @@ jobs:
run: |
cd ${{ env.WORKDIR}}
export VERSION=$(git describe --abbrev=0)
poetry version $VERSION
make upgrade-version NEW_VERSION=$VERSION
poetry config repositories.testpypi https://test.pypi.org/legacy/
poetry publish --repository testpypi --no-interaction