Skip to content

Commit de302ee

Browse files
committed
update action, add ubuntu20 and macos11 release
1 parent ac91832 commit de302ee

5 files changed

Lines changed: 20 additions & 8 deletions

File tree

.github/workflows/pack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
# The type of runner that the job will run on
2121
strategy:
2222
matrix:
23-
os: [windows-latest, macos-latest]
23+
os: ["windows-latest", "macos-latest", "macos-11"]
2424
python-version: ["3.8", "3.9", "3.10"] # must use str, not int, or 3.10 will be recognized as 3.1
2525
runs-on: ${{ matrix.os }}
2626
# Steps represent a sequence of tasks that will be executed as part of the job

.github/workflows/pack_linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
# The type of runner that the job will run on
2121
strategy:
2222
matrix:
23-
os: [ubuntu-latest]
23+
os: ["ubuntu-latest", "ubuntu-20.04"]
2424
python-version: ["3.8", "3.9", "3.10"] # must use str, not int, or 3.10 will be recognized as 3.1
2525
runs-on: ${{ matrix.os }}
2626
# Steps represent a sequence of tasks that will be executed as part of the job

.github/workflows/release_linux.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
strategy:
2020
matrix:
2121
python-version: ["3.9"] # must use str, not int, or 3.10 will be recognized as 3.1
22-
os: [ubuntu-latest]
22+
os: ["ubuntu-latest", "ubuntu-20.04"]
2323
runs-on: ${{ matrix.os }}
2424
# Steps represent a sequence of tasks that will be executed as part of the job
2525
steps:
@@ -69,4 +69,4 @@ jobs:
6969
asset_name: ${{ steps.pack.outputs.release_name }}
7070
tag: ${{ github.ref }}
7171
repo_token: ${{ secrets.GITHUB_TOKEN }}
72-
72+

.github/workflows/release_macos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
strategy:
2020
matrix:
2121
python-version: ["3.9"] # must use str, not int, or 3.10 will be recognized as 3.1
22-
os: [macos-latest]
22+
os: ["macos-latest", "macos-11"]
2323
runs-on: ${{ matrix.os }}
2424
# Steps represent a sequence of tasks that will be executed as part of the job
2525
steps:

pack.py

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,23 @@ def pack():
146146
if __name__ == "__main__":
147147
if len(sys.argv) > 1:
148148
os_name = sys.argv[1]
149-
if os_name == "ubuntu-latest":
149+
if os_name.startswith("ubuntu"):
150+
if os_name != "ubuntu-latest":
151+
linux_out_new = linux_out.replace("ubuntu", os_name.replace("-", "_"))
152+
os.rename(linux_out, linux_out_new)
153+
linux_out = linux_out_new
150154
print(linux_out)
151-
elif os_name == "windows-latest":
155+
elif os_name.startswith("windows"):
156+
if os_name != "windows-latest":
157+
windows_out_new = windows_out.replace("windows", os_name.replace("-", "_"))
158+
os.rename(windows_out, windows_out_new)
159+
windows_out = windows_out_new
152160
print(windows_out)
153-
elif os_name == "macos-latest":
161+
elif os_name.startswith("macos"):
162+
if os_name != "macos-latest":
163+
macos_out_new = macos_out.replace("macos", os_name.replace("-", "_"))
164+
os.rename(macos_out, macos_out_new)
165+
macos_out = macos_out_new
154166
print(macos_out)
155167
else:
156168
sys.exit(1)

0 commit comments

Comments
 (0)