Skip to content

Commit

Permalink
inject env var to hardcode spec.platform
Browse files Browse the repository at this point in the history
  • Loading branch information
asg017 committed May 16, 2023
1 parent d3d9d09 commit 554fe0b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 17 deletions.
28 changes: 12 additions & 16 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,31 +98,27 @@ jobs:
- run: |
rm bindings/ruby/lib/*.{dylib,so,dll} || true
cp sqlite-hello-macos-x86_64-extension/*.dylib bindings/ruby/lib
gem -C bindings/ruby build \
--platform x86_64-darwin \
-o x86_64-darwin.gem \
sqlite_hello.gemspec
gem -C bindings/ruby build -o x86_64-darwin.gem sqlite_hello.gemspec
env:
PLATFORM: x86_64-darwin
- run: |
rm bindings/ruby/lib/*.{dylib,so,dll} || true
cp sqlite-hello-macos-aarch64-extension/*.dylib bindings/ruby/lib
gem -C bindings/ruby build \
--platform arm64-darwin \
-o arm64-darwin.gem \
sqlite_hello.gemspec
gem -C bindings/ruby build -o arm64-darwin.gem sqlite_hello.gemspec
env:
PLATFORM: arm64-darwin
- run: |
rm bindings/ruby/lib/*.{dylib,so,dll} || true
cp sqlite-hello-linux-x86_64-extension/*.so bindings/ruby/lib
gem -C bindings/ruby build \
--platform x86_64-linux \
-o x86_64-linux.gem \
sqlite_hello.gemspec
gem -C bindings/ruby build -o x86_64-linux.gem sqlite_hello.gemspec
env:
PLATFORM: x86_64-linux
- run: |
rm bindings/ruby/lib/*.{dylib,so,dll} || true
cp sqlite-hello-windows-x86_64-extension/*.dll bindings/ruby/lib
gem -C bindings/ruby build \
--platform x64-mingw32 \
-o x64-mingw32.gem \
sqlite_hello.gemspec
gem -C bindings/ruby build -o x64-mingw32.gem sqlite_hello.gemspec
env:
PLATFORM: x64-mingw32
- run: |
gem push bindings/ruby/x86_64-darwin.gem
gem push bindings/ruby/arm64-darwin.gem
Expand Down
2 changes: 1 addition & 1 deletion bindings/ruby/sqlite_hello.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
spec.homepage = "https://github.com/asg017/sqlite-ecosystem"
spec.license = "MIT"

spec.platform = Gem::Platform::CURRENT
spec.platform = ENV['PLATFORM']

if spec.respond_to?(:metadata)

Expand Down

0 comments on commit 554fe0b

Please sign in to comment.