Skip to content

Commit

Permalink
test get version on github action
Browse files Browse the repository at this point in the history
  • Loading branch information
hardingadonis committed Apr 5, 2024
1 parent 8f81496 commit 99a5ddc
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/auto-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,13 @@ jobs:
cd build
cmake "../src/aseprite" -G Ninja -DCMAKE_BUILD_TYPE=MinSizeRel -DLAF_BACKEND=skia -DSKIA_DIR="../src/skia" -DSKIA_LIBRARY_DIR="../src/skia/out/Release-x64" -DSKIA_LIBRARY="../src/skia/out/Release-x64/skia.lib"
ninja aseprite
- name: Get version
id: get_version
run: |
$version = Get-Content version.txt
echo "version=$version" >> $env:GITHUB_ENV
- name: Test version
run: |
echo "Version: ${{ steps.get_version.outputs.version }}"
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ _deps

.venv/
src/
build/
build/
*.txt
11 changes: 7 additions & 4 deletions download.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ def get_latest_tag_aseprite():
response_json = response.json()
return response_json['tag_name']

def save_aseprite_tag(tag):
with open('version.txt', 'w') as f:
f.write(tag)

def clone_aseprite(tag):
clone_url = f'https://github.com/{ASEPRITE_REPOSITORY}.git'
git_cmd = f'git clone -b {tag} {clone_url} src/aseprite --depth 1'
Expand All @@ -32,11 +36,10 @@ def download_skia_for_windows(tag):

os.system(f'7z x src/{SKIA_RELEASE_FILE_NAME} -osrc/skia')

pass

if __name__ == '__main__':
aseprite_tag = get_latest_tag_aseprite()
clone_aseprite(aseprite_tag)
#clone_aseprite(aseprite_tag)
save_aseprite_tag(aseprite_tag)

skia_tag = get_latest_tag_skia()
download_skia_for_windows(skia_tag)
#download_skia_for_windows(skia_tag)

0 comments on commit 99a5ddc

Please sign in to comment.