Skip to content

Commit bdc6a22

Browse files
committed
feat: added 6 more platforms
Signed-off-by: rafaeljohn9 <[email protected]>
1 parent bebd445 commit bdc6a22

File tree

3 files changed

+79
-13
lines changed

3 files changed

+79
-13
lines changed

.github/workflows/build.yml

Lines changed: 77 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424

2525
publish-binaries:
2626
name: Publish binaries
27-
runs-on: ${{ matrix.build.os }}
27+
runs-on: ${{ matrix.build.OS }}
2828
needs: publish-cargo
2929
strategy:
3030
fail-fast: false
@@ -33,41 +33,95 @@ jobs:
3333
- {
3434
NAME: linux-x64-glibc,
3535
OS: ubuntu-22.04,
36+
TOOLCHAIN: stable,
3637
TARGET: x86_64-unknown-linux-gnu,
3738
NPM_PUBLISH: true,
3839
PYPI_PUBLISH: true
3940
}
4041
- {
4142
NAME: linux-x64-musl,
4243
OS: ubuntu-22.04,
44+
TOOLCHAIN: stable,
4345
TARGET: x86_64-unknown-linux-musl,
4446
NPM_PUBLISH: false,
4547
PYPI_PUBLISH: true
4648
}
49+
- {
50+
NAME: linux-x86-glibc,
51+
OS: ubuntu-22.04,
52+
TOOLCHAIN: stable,
53+
TARGET: i686-unknown-linux-gnu,
54+
NPM_PUBLISH: false,
55+
PYPI_PUBLISH: false
56+
}
57+
- {
58+
NAME: linux-x86-musl,
59+
OS: ubuntu-22.04,
60+
TOOLCHAIN: stable,
61+
TARGET: i686-unknown-linux-musl,
62+
NPM_PUBLISH: false,
63+
PYPI_PUBLISH: true
64+
}
4765
- {
4866
NAME: linux-arm64-glibc,
4967
OS: ubuntu-22.04,
68+
TOOLCHAIN: stable,
5069
TARGET: aarch64-unknown-linux-gnu,
5170
NPM_PUBLISH: true,
5271
PYPI_PUBLISH: true
5372
}
73+
- {
74+
NAME: linux-arm64-musl,
75+
OS: ubuntu-22.04,
76+
TOOLCHAIN: stable,
77+
TARGET: aarch64-unknown-linux-musl,
78+
NPM_PUBLISH: false,
79+
PYPI_PUBLISH: true
80+
}
81+
- {
82+
NAME: win32-x64-mingw,
83+
OS: windows-latest,
84+
TOOLCHAIN: stable,
85+
TARGET: x86_64-pc-windows-gnu,
86+
NPM_PUBLISH: false,
87+
PYPI_PUBLISH: false
88+
}
5489
- {
5590
NAME: win32-x64-msvc,
5691
OS: windows-latest,
92+
TOOLCHAIN: stable,
5793
TARGET: x86_64-pc-windows-msvc,
5894
NPM_PUBLISH: true,
5995
PYPI_PUBLISH: true
6096
}
97+
- {
98+
NAME: win32-x86-msvc,
99+
OS: windows-latest,
100+
TOOLCHAIN: stable,
101+
TARGET: i686-pc-windows-msvc,
102+
NPM_PUBLISH: false,
103+
PYPI_PUBLISH: true
104+
}
105+
- {
106+
NAME: win32-arm64-msvc,
107+
OS: windows-latest,
108+
TOOLCHAIN: stable,
109+
TARGET: aarch64-pc-windows-msvc,
110+
NPM_PUBLISH: true,
111+
PYPI_PUBLISH: false
112+
}
61113
- {
62114
NAME: darwin-x64,
63115
OS: macos-15,
116+
TOOLCHAIN: stable,
64117
TARGET: x86_64-apple-darwin,
65118
NPM_PUBLISH: true,
66119
PYPI_PUBLISH: true
67120
}
68121
- {
69122
NAME: darwin-arm64,
70123
OS: macos-15,
124+
TOOLCHAIN: stable,
71125
TARGET: aarch64-apple-darwin,
72126
NPM_PUBLISH: true,
73127
PYPI_PUBLISH: true
@@ -79,7 +133,7 @@ jobs:
79133
- name: Setup Rust
80134
uses: actions-rs/toolchain@v1
81135
with:
82-
toolchain: stable
136+
toolchain: ${{ matrix.build.TOOLCHAIN }}
83137
target: ${{ matrix.build.TARGET }}
84138

85139
- name: Install cross
@@ -387,12 +441,19 @@ jobs:
387441
return 'gh-templates-linux-x64-glibc'
388442
elif arch == 'arm64':
389443
return 'gh-templates-linux-arm64-glibc'
444+
elif arch == 'x86':
445+
return 'gh-templates-linux-x86-musl'
390446
else:
391447
return f'gh-templates-linux-{arch}-glibc'
392448
elif system == 'darwin':
393449
return f'gh-templates-darwin-{arch}'
394450
elif system == 'windows':
395-
return f'gh-templates-win32-{arch}-msvc'
451+
if arch == 'x64':
452+
return 'gh-templates-win32-x64-msvc'
453+
elif arch == 'x86':
454+
return 'gh-templates-win32-x86-msvc'
455+
else:
456+
return f'gh-templates-win32-{arch}-msvc'
396457
else:
397458
# Fallback to linux x64
398459
return 'gh-templates-linux-x64-glibc'
@@ -418,9 +479,9 @@ jobs:
418479
419480
## Supported Platforms
420481
421-
- Linux (x64, ARM64)
482+
- Linux (x64, x86, ARM64) - glibc and musl variants
422483
- macOS (x64, ARM64)
423-
- Windows (x64)
484+
- Windows (x64, x86, ARM64)
424485
''',
425486
long_description_content_type='text/markdown',
426487
packages=find_packages(),
@@ -506,9 +567,9 @@ jobs:
506567
print("2. The platform-specific package failed to install")
507568
print()
508569
print("Supported platforms:")
509-
print("- Linux x64/ARM64")
570+
print("- Linux x64/x86/ARM64 (glibc/musl)")
510571
print("- macOS x64/ARM64")
511-
print("- Windows x64")
572+
print("- Windows x64/x86/ARM64")
512573
print()
513574
print("Please report this issue at:")
514575
print("https://github.com/RafaelJohn9/gh-templates/issues")
@@ -546,9 +607,9 @@ jobs:
546607
547608
This package automatically installs the correct binary for your platform:
548609
549-
- **Linux**: x64, ARM64 (glibc and musl)
610+
- **Linux**: x64, x86, ARM64 (glibc and musl variants)
550611
- **macOS**: x64 (Intel), ARM64 (Apple Silicon)
551-
- **Windows**: x64
612+
- **Windows**: x64, x86, ARM64
552613
553614
## How it Works
554615
@@ -608,7 +669,8 @@ jobs:
608669
"gh-templates-linux-arm64": "${{ env.RELEASE_VERSION }}",
609670
"gh-templates-darwin-x64": "${{ env.RELEASE_VERSION }}",
610671
"gh-templates-darwin-arm64": "${{ env.RELEASE_VERSION }}",
611-
"gh-templates-windows-x64": "${{ env.RELEASE_VERSION }}"
672+
"gh-templates-windows-x64": "${{ env.RELEASE_VERSION }}",
673+
"gh-templates-windows-arm64": "${{ env.RELEASE_VERSION }}"
612674
},
613675
"files": ["bin/"],
614676
"engines": {
@@ -630,7 +692,11 @@ jobs:
630692
631693
let packageName;
632694
if (platform === 'win32') {
633-
packageName = 'gh-templates-windows-x64';
695+
if (arch === 'arm64') {
696+
packageName = 'gh-templates-windows-arm64';
697+
} else {
698+
packageName = 'gh-templates-windows-x64';
699+
}
634700
} else if (platform === 'darwin') {
635701
packageName = arch === 'arm64' ? 'gh-templates-darwin-arm64' : 'gh-templates-darwin-x64';
636702
} else if (platform === 'linux') {

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22

33
name = "gh-templates"
4-
version = "0.1.25"
4+
version = "0.1.26"
55
edition = "2021"
66
authors = ["John Kagunda [email protected]"]
77
description = "A template project for GitHub-related utilities."

0 commit comments

Comments
 (0)