Skip to content

Commit 548c09b

Browse files
committed
fix actions
1 parent 7d6f6c4 commit 548c09b

2 files changed

Lines changed: 31 additions & 31 deletions

File tree

.github/workflows/release.yml

Lines changed: 16 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
tags:
66
- "v*"
77

8+
permissions:
9+
contents: write
10+
811
jobs:
912
build-native:
1013
name: Build (${{ matrix.ruby-platform }})
@@ -16,16 +19,6 @@ jobs:
1619
- os: ubuntu-latest
1720
ruby-platform: x86_64-linux
1821
rust-target: x86_64-unknown-linux-gnu
19-
- os: ubuntu-latest
20-
ruby-platform: aarch64-linux
21-
rust-target: aarch64-unknown-linux-gnu
22-
use-cross: true
23-
- os: macos-15
24-
ruby-platform: x86_64-darwin
25-
rust-target: x86_64-apple-darwin
26-
- os: macos-14
27-
ruby-platform: arm64-darwin
28-
rust-target: aarch64-apple-darwin
2922

3023
steps:
3124
- uses: actions/checkout@v6
@@ -46,38 +39,31 @@ jobs:
4639
run: cargo install cross --git https://github.com/cross-rs/cross
4740

4841
- name: Build CLI binary
49-
run: |
50-
if [ "${{ matrix.use-cross }}" = "true" ]; then
51-
cd ext && cross build --release --features cli --bin methodray-cli --target ${{ matrix.rust-target }}
52-
else
53-
cd ext && cargo build --release --features cli --bin methodray-cli --target ${{ matrix.rust-target }}
54-
fi
42+
run: cargo build --release -p methodray-core --features cli --bin methodray
5543

5644
- name: Build FFI extension
57-
run: |
58-
if [ "${{ matrix.use-cross }}" = "true" ]; then
59-
cd ext && cross build --release --lib --target ${{ matrix.rust-target }}
60-
else
61-
cd ext && cargo build --release --lib --target ${{ matrix.rust-target }}
62-
fi
45+
run: cargo build --release -p methodray --lib
6346

6447
- name: Copy binaries to lib directory
6548
run: |
6649
mkdir -p lib/methodray
67-
# Copy CLI binary
50+
# Debug: List build outputs
51+
echo "=== Checking target/release/ ==="
52+
ls -la target/release/ || echo "target/release/ does not exist"
53+
# Copy CLI binary (from methodray-core package)
6854
if [[ "${{ matrix.rust-target }}" == *"windows"* ]]; then
69-
cp target/${{ matrix.rust-target }}/release/methodray-cli.exe lib/methodray/
55+
cp target/release/methodray.exe lib/methodray/methodray-cli.exe
7056
else
71-
cp target/${{ matrix.rust-target }}/release/methodray-cli lib/methodray/
57+
cp target/release/methodray lib/methodray/methodray-cli
7258
fi
7359
chmod 755 lib/methodray/methodray-cli* || true
74-
# Copy FFI extension
60+
# Copy FFI extension (from methodray package in ext/)
7561
case "${{ matrix.ruby-platform }}" in
7662
*-darwin)
77-
cp target/${{ matrix.rust-target }}/release/libmethodray.dylib lib/methodray/methodray.bundle
63+
cp target/release/libmethodray.dylib lib/methodray/methodray.bundle
7864
;;
7965
*-linux)
80-
cp target/${{ matrix.rust-target }}/release/libmethodray.so lib/methodray/methodray.so
66+
cp target/release/libmethodray.so lib/methodray/methodray.so
8167
;;
8268
esac
8369
ls -la lib/methodray/
@@ -167,10 +153,9 @@ jobs:
167153
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
168154

169155
- name: Publish to RubyGems
156+
env:
157+
GEM_HOST_API_KEY: ${{ secrets.GEM_HOST_API_KEY }}
170158
run: |
171-
mkdir -p ~/.gem
172-
echo -e "---\n:rubygems_api_key: ${{ secrets.GEM_HOST_API_KEY }}" > ~/.gem/credentials
173-
chmod 0600 ~/.gem/credentials
174159
for gem in release/*.gem; do
175160
echo "Pushing $gem..."
176161
gem push "$gem" || true

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [0.1.0] - 2025-01-18
9+
10+
### Added
11+
12+
- Initial release
13+
- `methodray check` - Static type checking for Ruby files
14+
15+
[0.1.0]: https://github.com/dak2/method-ray/releases/tag/v0.1.0

0 commit comments

Comments
 (0)