2024.9.4.64538 #21
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/* |