Skip to content

Commit

Permalink
Merge pull request #1 from M4RC0Sx/develop
Browse files Browse the repository at this point in the history
First release
  • Loading branch information
M4RC0Sx authored Aug 17, 2024
2 parents 42ece8c + db217bf commit c12e937
Show file tree
Hide file tree
Showing 27 changed files with 1,829 additions and 21 deletions.
85 changes: 85 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: release
on:
push:
branches:
- master

jobs:
release:
runs-on: ubuntu-latest
steps:
#----------------------------------------------
# Check-out repo
#----------------------------------------------
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

#----------------------------------------------
# Install Node.js and Semantic Release
#----------------------------------------------
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.16.0'
- name: Install Semantic Release
run: npm install -g [email protected] @semantic-release/[email protected] @semantic-release/[email protected] [email protected] [email protected]

#----------------------------------------------
# Install Python and Poetry
# It uses .python-version file
#----------------------------------------------
- name: Set up Python
uses: actions/setup-python@v5
id: setup-python
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.8.3
virtualenvs-create: true
virtualenvs-in-project: false
virtualenvs-path: ~/venvs
installer-parallel: true

#----------------------------------------------
# Cache venv
#----------------------------------------------
- name: Cache venv
uses: actions/cache@v4
id: cached-poetry-dependencies
with:
path: ~/venvs
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}

#----------------------------------------------
# Install dependencies if cache miss
#----------------------------------------------
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root

#----------------------------------------------
# Run poetry dummy command
#----------------------------------------------
- name: Run Poetry dummy command
run: poetry run python -m esiosapy
- name: Run Poetry dummy command 2
run: poetry run pip list

#----------------------------------------------
# Semantic Release
#----------------------------------------------
- name: Semantic Release
run: npx semantic-release
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}

#----------------------------------------------
# Build and publish package
#----------------------------------------------
- name: Build and publish package
run: poetry publish --build --no-interaction
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Ruff cache
.ruff_cache/

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.8.18
15 changes: 15 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Module",
"type": "debugpy",
"request": "launch",
"module": "esiosapy",
"justMyCode": true
}
]
}
Loading

0 comments on commit c12e937

Please sign in to comment.