-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (46 loc) · 2.17 KB
/
init-python.yml
File metadata and controls
58 lines (46 loc) · 2.17 KB
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
name: init-python
on:
push:
jobs:
build:
runs-on: windows-latest
# Release作成に必要
permissions:
contents: write
steps:
- name: Check out code
uses: actions/checkout@v5
- name: Python Embeddable Download
run: Invoke-WebRequest -Uri https://www.python.org/ftp/python/3.13.7/python-3.13.7-embed-amd64.zip -OutFile Python.zip
- name: Python Embeddable Setup
run: |
Expand-Archive .\Python.zip -DestinationPath .\Python\
(Get-Content .\Python\Python313._pth) -replace '#import site', 'import site' | Set-Content .\Python\Python313._pth
Invoke-WebRequest -Uri https://bootstrap.pypa.io/get-pip.py -OutFile .\Python\get-pip.py
.\Python\Python.exe .\Python\get-pip.py
.\Python\Python.exe -m pip install -U pip
- name: Python Embeddable Setup Dependencies
run: |
# PowerShell 上では行末のバックスラッシュ (\) は行継続に使えないため、
# パッケージは1行で指定するか、PowerShell の継続文字(バッククォート `)を正しく使う必要がある。
.\Python\Python.exe -m pip install pandas numpy matplotlib seaborn scikit-learn openpyxl xlrd ipykernel jupyterlab
- name: Compress Python
run: Compress-Archive -Path .\Python\* -DestinationPath .\Python_Embeddable.zip
- name: Update Release (always update latest release)
uses: softprops/action-gh-release@v2
with:
tag_name: latest
name: Python Embeddable
body: |
## Python Embeddable
- **Python Version**: 3.13.7
- **Package Manager**: pip
- **Added Package**: pandas, numpy, matplotlib, seaborn, scikit-learn, openpyxl, xlrd, ipykernel, jupyterlab
- **Build Date**: ${{ github.event.head_commit.timestamp }}
- **Commit**: ${{ github.sha }}
*This release is automatically updated on every push*
files: |
./Python_Embeddable.zip
make_latest: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}