Skip to content

Commit

Permalink
Added release, Fixed Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
charnley committed Mar 30, 2024
1 parent e26732f commit d9aa64b
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 15 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

name: Publish PyPI

on:
Expand All @@ -9,8 +8,8 @@ on:
jobs:

deploy:
name: Deploy Release
runs-on: ubuntu-latest
name: Publish Release
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v1
- name: Setup Python
Expand All @@ -21,10 +20,10 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install setuptools build twine
- name: Build and publish
- name: Build package
run: make build python=python
- name: Publish package
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
make build python=python
make upload python=python
run: make upload python=python
24 changes: 24 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Release Version

on:
push:
branches:
- main

jobs:

release:
name: Testing
runs-on: "ubuntu-latest"
defaults:
run:
shell: bash -l {0}
steps:
- name: Bump version
run: make something
- name: Commit version
run: make something
- name: Push to main
run: git push origin --tags
- name: Create release
run: no idea
7 changes: 1 addition & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

name: Test

on:
Expand All @@ -9,6 +8,7 @@ on:
branches: [ main ]

jobs:

test:
name: Testing
runs-on: "ubuntu-latest"
Expand All @@ -25,11 +25,6 @@ jobs:
activate-environment: dev
environment-file: ./environment_dev.yaml
python-version: ${{ matrix.python-version }}
- run: |
ls
pwd
which python
conda info
- run: pip install . -v
- run: make test python=python
- run: make format python=python
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ bump-version-dev:
test ! -z "${VERSION}"
test ! -z "${GIT_COMMIT}"
exit 1
# Not Implemented

bump-version-patch:
test ! -z "${VERSION_PATCH}"
# VERSION_PATCH=$(shell awk 'BEGIN{print ${VERSION_PATCH}+1}')
echo "__version__ = \"${VERSION_MAJOR}.${VERSION_MINOR}.$(shell awk 'BEGIN{print ${VERSION_PATCH}+1}')\"" > ${version_file}

bump-version-minor:
Expand All @@ -69,7 +69,12 @@ bump-version-minor:

bump-version-major:
test ! -z "${VERSION_MAJOR}"
echo "__version__ = \"$(shell awk 'BEGIN{print ${VERSION_MAJOR}+1}').0.0\"" > {version_file}
echo "__version__ = \"$(shell awk 'BEGIN{print ${VERSION_MAJOR}+1}').0.0\"" > ${version_file}

commit-version-tag:
git tag --list | grep -qix "${VERSION}"
git commit -m "Release ${VERSION}" --no-verify ${version_file}
git tag 'v${VERSION}'

## Clean

Expand Down

0 comments on commit d9aa64b

Please sign in to comment.