Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into add-measure-base-c…
Browse files Browse the repository at this point in the history
…lass
  • Loading branch information
nllong committed Jan 6, 2024
2 parents 69989bd + b0e0d8f commit 5f8851d
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 2 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/pypi_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: PyPIRelease
# https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12

- name: Install pypa/build
run: >-
python3 -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: python3 -m build

- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/

release:
name: >-
Publish Python 🐍 distribution 📦 to PyPI
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi_release
url: https://pypi.org/p/modelica-builder
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing

steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
9 changes: 9 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
Changelog
=========

Version 0.5.1
=============

## What's Changed
* Ensure the correct template is loaded when parsing the package by @vtnate in https://github.com/urbanopt/modelica-builder/pull/81
* Create config file to automatically publish to pypi when a Github release is made by @vtnate in https://github.com/urbanopt/modelica-builder/pull/82

**Full Changelog**: https://github.com/urbanopt/modelica-builder/compare/v0.5.0...v0.5.1

Version 0.5.0
=============

Expand Down
2 changes: 1 addition & 1 deletion modelica_builder/package_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def new_from_template(cls,
PackageParser: object of the package parser
"""
klass = PackageParser(path)
if not mbl_version:
if within and not mbl_version:
template = klass.template_env.get_template("package.mot")
else:
template = klass.template_env.get_template("package_base.mot")
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "modelica-builder"
version = "0.5.0"
version = "0.5.1"
description = "Modelica builder enables programmatic parsing and modification of Modelica files."
authors = ["Nicholas Long <[email protected]>", "Nathan Moore <[email protected]>"]
license = "BSD-3-Clause"
Expand Down

0 comments on commit 5f8851d

Please sign in to comment.