mirror of https://github.com/abpframework/abp.git
1 changed files with 33 additions and 41 deletions
@ -1,41 +1,33 @@ |
|||||
import os |
name: Update Latest Versions |
||||
import json |
|
||||
import xml.etree.ElementTree as ET |
on: |
||||
|
release: |
||||
def get_version_from_common_props(): |
types: |
||||
""" common.props dosyasındaki versiyon bilgilerini çeker. """ |
- published |
||||
tree = ET.parse("common.props") |
|
||||
root = tree.getroot() |
permissions: |
||||
|
contents: write |
||||
version = root.find(".//Version").text |
pull-requests: write |
||||
leptonx_version = root.find(".//LeptonXVersion").text |
|
||||
|
jobs: |
||||
return version, leptonx_version |
update-versions: |
||||
|
runs-on: ubuntu-latest |
||||
def update_latest_versions(): |
steps: |
||||
version, leptonx_version = get_version_from_common_props() |
- name: Checkout repository |
||||
|
uses: actions/checkout@v2 |
||||
# Eğer versiyon "preview" içeriyorsa PR oluşturma (sadece stable versiyonlar için) |
|
||||
if "preview" in version or "rc" in version: |
- name: Set up Python |
||||
return False |
uses: actions/setup-python@v2 |
||||
|
with: |
||||
with open("latest-versions.json", "r") as f: |
python-version: 3.x |
||||
latest_versions = json.load(f) |
|
||||
|
- name: Install dependencies |
||||
# Yeni versiyon bilgisini en üst sıraya ekle |
run: | |
||||
new_version_entry = { |
python -m pip install --upgrade pip |
||||
"version": version, |
pip install PyGithub |
||||
"releaseDate": "", |
|
||||
"type": "stable", |
- name: Update latest-versions.json and create PR |
||||
"message": "", |
env: |
||||
"leptonx": { |
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} |
||||
"version": leptonx_version |
run: | |
||||
} |
python .github/scripts/update_versions.py |
||||
} |
|
||||
|
|
||||
latest_versions.insert(0, new_version_entry) # Yeni versiyonu en üste ekliyoruz |
|
||||
|
|
||||
with open("latest-versions.json", "w") as f: |
|
||||
json.dump(latest_versions, f, indent=2) |
|
||||
|
|
||||
return True |
|
||||
|
|||||
Loading…
Reference in new issue