-
-
Notifications
You must be signed in to change notification settings - Fork 855
63 lines (53 loc) · 1.52 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: release
on:
push:
tags:
- "v*.*.*"
jobs:
build:
uses: kitao/pyxel/.github/workflows/build.yml@main
release:
runs-on: macos-13
needs: build
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Download wheels
uses: actions/download-artifact@v3
with:
name: pyxel-wheels
path: dist
- name: Get Pyxel version
run: |
PYXEL_VERSION=$(echo $GITHUB_REF | sed 's/refs\/tags\/v//')
echo "PYXEL_VERSION=${PYXEL_VERSION}" >> $GITHUB_ENV
- name: Create release
uses: softprops/action-gh-release@v1
with:
name: Pyxel ${{ env.PYXEL_VERSION }}
tag_name: ${{ github.ref }}
files: dist/*
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Publish wheels
run: |
pip install twine
twine upload dist/*
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Publish crates
run: |
cargo login ${{ secrets.CARGO_REGISTRY_TOKEN }}
cd rust/pyxel-platform
cargo publish
sleep 60
cd ../pyxel-engine
cargo publish
sleep 60
cd ../pyxel-wrapper
RUSTFLAGS="-C link-arg=-undefined -C link-arg=dynamic_lookup" cargo publish