try to get the version from the refs
This commit is contained in:
7
.github/workflows/main.yml
vendored
7
.github/workflows/main.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: Build and Release on Main
|
||||
name: Build and Release on Tag
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -14,11 +14,11 @@ jobs:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# Extract version from version.py
|
||||
# Extract the tag version
|
||||
- name: Extract Version
|
||||
id: extract_version
|
||||
run: |
|
||||
version=$(python3 -c "import version; print(version.__version__)")
|
||||
version=${GITHUB_REF#refs/tags/}
|
||||
echo "VERSION=$version" >> $GITHUB_ENV
|
||||
|
||||
# Set up Docker
|
||||
@@ -48,6 +48,5 @@ jobs:
|
||||
tag_name: ${{ env.VERSION }}
|
||||
name: Release ${{ env.VERSION }}
|
||||
generate_release_notes: true
|
||||
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
Reference in New Issue
Block a user