EdoardoGiussani is releasing refs/tags/v.5.8 #12
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: Create release and deploy | |
run-name: ${{ github.actor }} is releasing ${{ github.ref }} | |
on: | |
push: | |
tags: | |
- "v.*" | |
permissions: | |
contents: write | |
jobs: | |
build-sqlite-db: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Build SQLite DB | |
run: | | |
mkdir -p src/flumut_db_data/ | |
touch src/flumut_db_data/__init__.py | |
cat flumut_db.sql | sqlite3 src/flumut_db_data/flumut_db.sqlite | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install build | |
- name: Build package | |
run: python -m build | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dist_folder | |
path: dist | |
- name: Create release | |
uses: softprops/action-gh-release@v2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
files: | | |
src/flumut_db_data/flumut_db.sqlite | |
dist/* | |
pypi-publish: | |
name: upload release to PyPI | |
runs-on: ubuntu-latest | |
# Specifying a GitHub environment is optional, but strongly encouraged | |
# environment: release | |
permissions: | |
# IMPORTANT: this permission is mandatory for trusted publishing | |
id-token: write | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
name: dist_folder | |
path: dist | |
# retrieve your distributions here | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |