-
-
Notifications
You must be signed in to change notification settings - Fork 91
40 lines (35 loc) · 1.15 KB
/
github-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
name: Build Python distributions and create GitHub Release
on:
push:
tags:
- v*.*.*
jobs:
github-release:
name: Build and publish Python distributions to TestPyPI and PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '16'
- run: npm install
- run: npm run build:prd
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
pip install --progress-bar off wheel twine
- run: python setup.py sdist bdist_wheel
- run: twine check dist/*
- name: Create GitHub release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
export TAGNAME=$(jq --raw-output .ref "$GITHUB_EVENT_PATH" | sed -e "s/refs\/tags\///")
cp ./optuna_dashboard/public/bundle.js ./dist/
cp ./optuna_dashboard/public/bundle.js.LICENSE.txt ./dist/
gh release create ${TAGNAME} --draft dist/*