Skip to content

Commit

Permalink
Denali Release (0.8.0) (#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosfelt authored Apr 17, 2021
1 parent 8d84dfa commit 2a8dfba
Show file tree
Hide file tree
Showing 4 changed files with 736 additions and 888 deletions.
72 changes: 33 additions & 39 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,51 +38,45 @@ jobs:
run: poetry install -E experiments

- name: Run pytest
run: poetry run pytest --doctest-modules --ignore=case_studies --ignore=experiments --disable-warnings
run: poetry run pytest --doctest-modules --ignore=experiments --disable-warnings

# Check that the build process works correctly
- name: Build package
run: poetry build

# Publish to pypi on version change
publish:
needs: test_build
runs-on: ubuntu-latest

- name: Save build
uses: actions/upload-artifact@v2
with:
name: ${{ github.sha }}-build
path: dist/

steps:
- uses: actions/checkout@v2
with:
# Make sure to fetch the last two commits
# Needed forthe version bump and tag
fetch-depth: 2


# # Publish to pypi on version change
# publish:
# needs: test_build
# runs-on: ubuntu-latest

# steps:
# - uses: actions/checkout@v2
# with:
# # Make sure to fetch the last two commits
# # Needed forthe version bump and tag
# fetch-depth: 2

# - name: Install toml
# run: pip install toml
- name: Install python
uses: actions/setup-python@v2
with:
python-version: '3.7'

# - name: Check for version bump and tag
# id: version_check
# uses: salsify/action-detect-and-tag-new-version@v2
# with:
# create-tag: $ {{ github.ref == 'refs/heads/master' }} # only create new tag on master
# version-command: |
# python get_version.py
- name: Install poetry
uses: Gr1N/setup-poetry@v4

# - name: Download poetry build
# uses: actions/download-artifact@v2
# with:
# name: ${{ github.sha }}-build
- name: Install toml
run: pip install toml

# - name: Install poetry
# uses: Gr1N/setup-poetry@v3
- name: Check for version bump and tag
id: version_check
uses: salsify/action-detect-and-tag-new-version@v2
with:
tag-template: "{VERSION}"
create-tag: ${{ github.ref == 'refs/heads/master' }} # only create new tag on master
version-command: |
python get_version.py
# - name: Publish
# # Only publish if there is a new tag
# if: ${{ steps.version_check.tag }}
# run: poetry publish -u {{ secrets.PYPI_USERNAME }} -p {{ $ secrets.PYPI_PASSWORD }}
- name: Publish
# Only publish if there is a new tag
if: ${{ steps.version_check.tag }}
run: poetry publish --build -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_PASSWORD }}
10 changes: 5 additions & 5 deletions get_version.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# import toml
import toml

# with open("pyproject.toml", "r") as f:
# text = f.read()
with open("pyproject.toml", "r") as f:
text = f.read()

# toml_dict = toml.loads(text)
toml_dict = toml.loads(text)

# print(toml_dict["tool"]["poetry"]["version"])
print(toml_dict["tool"]["poetry"]["version"])
Loading

0 comments on commit 2a8dfba

Please sign in to comment.