Skip to content

Commit

Permalink
chore: update GitHub Actions workflow to set version from release tag
Browse files Browse the repository at this point in the history
  • Loading branch information
hot666666 committed Dec 15, 2024
1 parent f163a24 commit c4a94dd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@ jobs:
with:
fetch-depth: 0

- name: Show Git tags
run: |
git tag # 태그 정보를 출력하여 확인
git describe --tags
- name: Set up Python
uses: actions/setup-python@v4
with:
Expand All @@ -28,6 +23,13 @@ jobs:
curl -sSL https://install.python-poetry.org | python3 -
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Set version from release tag
run: |
TAG_NAME=${{ github.event.release.tag_name }}
echo "Release tag: $TAG_NAME"
poetry version ${TAG_NAME#v} # 'v' 접두사를 제거하고 버전 설정
cat pyproject.toml # 확인용
- name: Install dependencies
run: |
poetry install --with dev
Expand Down
5 changes: 1 addition & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,4 @@ pytest = "^8.3.4"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.poetry-dynamic-versioning]
enable = true
build-backend = "poetry.core.masonry.api"

0 comments on commit c4a94dd

Please sign in to comment.