-
-
Notifications
You must be signed in to change notification settings - Fork 12
49 lines (42 loc) · 1.11 KB
/
ReleaseActions.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
name: "Release actions"
on:
release:
types: ["published"]
env:
PYTHON_VERSION: "3.x"
jobs:
deploy:
runs-on: ubuntu-latest
name: Deploy to PyPi
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Python
uses: actions/[email protected]
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: yarn
- name: "Set version number from tag"
run: |
echo -n '${{ github.ref_name }}' > ./VERSION
sed -i 's/dev/${{ github.ref_name }}/g' ./src/version.ts
cat ./VERSION
cat ./src/version.ts
- name: Install dependencies
run: |
python -m pip install build twine
./script/bootstrap
- name: Build
run: yarn build
- name: Publish to PyPi
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
python -m build
twine upload dist/*