Skip to content

Commit

Permalink
add prefix script
Browse files Browse the repository at this point in the history
  • Loading branch information
zoe committed Sep 17, 2024
1 parent 6b7fee2 commit 9c2b554
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 21 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
- uses: Swatinem/rust-cache@v2
- name: build binary
run: cargo xtask bundle -p x_fader
- name: add file extension
run: python3 rename_release_files_windows.py
- name: add release prefix
run: python3 add_release_prefix.py windows_
- uses: ncipollo/release-action@v1
with:
artifacts: ".\target\bundled\\*"
artifacts: '.\target\bundled\*'
allowUpdates: true
tag: "release"
12 changes: 12 additions & 0 deletions add_release_prefix.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import os
import sys

directory = os.path.join("target", "bundled")
prefix = sys.argv[0]

for filename in os.listdir(directory):
old_file = os.path.join(directory)
new_file = os.path.join(directory, prefix + filename)
os.rename(old_file, new_file)

print(f"Prefix '{prefix}' added to release files")
18 changes: 0 additions & 18 deletions rename_release_files_windows.py

This file was deleted.

0 comments on commit 9c2b554

Please sign in to comment.