3232 sudo apt-get update
3333 sudo apt-get install -y meson ninja-build nasm yasm build-essential autoconf automake libtool pkg-config yasm cmake
3434
35- - name : Install Rust
36- run : |
37- rustup update stable
38- rustup default stable
39-
4035 - name : Setup version for build
4136 run : |
4237 # Cargo.toml のバージョンを取得
@@ -46,13 +41,18 @@ jobs:
4641 # -canary. を -dev. に変換(必要な場合のみ)
4742 if [[ "$ORIGINAL_VERSION" == *"-canary."* ]]; then
4843 PYTHON_VERSION="${ORIGINAL_VERSION//-canary./-dev.}"
49- echo "Converting to: $PYTHON_VERSION"
44+ echo "Converting to Python-compatible version : $PYTHON_VERSION"
5045 sed -i "s/^version = \"$ORIGINAL_VERSION\"/version = \"$PYTHON_VERSION\"/" Cargo.toml
5146 if [ -f Cargo.lock ]; then
5247 sed -i "s/^version = \"$ORIGINAL_VERSION\"/version = \"$PYTHON_VERSION\"/" Cargo.lock
5348 fi
5449 fi
5550
51+ - name : Install Rust
52+ run : |
53+ rustup update stable
54+ rustup default stable
55+
5656 - name : Build with cargo
5757 run : cargo build --release
5858
9292 brew update
9393 brew install meson nasm yasm automake autoconf libtool
9494
95- - name : Install Rust
96- run : |
97- rustup update stable
98- rustup default stable
99-
10095 - name : Setup version for build
10196 run : |
10297 # Cargo.toml のバージョンを取得
@@ -106,14 +101,19 @@ jobs:
106101 # -canary. を -dev. に変換(必要な場合のみ)
107102 if [[ "$ORIGINAL_VERSION" == *"-canary."* ]]; then
108103 PYTHON_VERSION="${ORIGINAL_VERSION//-canary./-dev.}"
109- echo "Converting to: $PYTHON_VERSION"
110- # macOS の sed は -i オプションが異なる
104+ echo "Converting to Python-compatible version : $PYTHON_VERSION"
105+ # macOS では sed -i に '' が必要
111106 sed -i '' "s/^version = \"$ORIGINAL_VERSION\"/version = \"$PYTHON_VERSION\"/" Cargo.toml
112107 if [ -f Cargo.lock ]; then
113108 sed -i '' "s/^version = \"$ORIGINAL_VERSION\"/version = \"$PYTHON_VERSION\"/" Cargo.lock
114109 fi
115110 fi
116111
112+ - name : Install Rust
113+ run : |
114+ rustup update stable
115+ rustup default stable
116+
117117 - name : Build with cargo
118118 run : cargo build --release
119119
@@ -136,7 +136,6 @@ jobs:
136136 if : startsWith(github.ref, 'refs/tags/')
137137 needs : [linux-wheel, macos-wheel]
138138 runs-on : ubuntu-latest
139- environment : pypi
140139 permissions :
141140 id-token : write
142141 steps :
@@ -152,8 +151,11 @@ jobs:
152151 uses : pypa/gh-action-pypi-publish@release/v1
153152 with :
154153 repository-url : https://test.pypi.org/legacy/
155- verbose : true
154+ env :
155+ name : testpypi
156156
157157 # 本番用
158158 # - name: Publish package to PyPI
159159 # uses: pypa/gh-action-pypi-publish@release/v1
160+ # env:
161+ # name: pypi
0 commit comments