Release 0.17.2 #13
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: package | |
on: | |
release: | |
types: [created] | |
jobs: | |
version: | |
runs-on: ubuntu-latest | |
outputs: | |
app-version: ${{ steps.set-version.outputs.version }} | |
steps: | |
- uses: actions/checkout@v4 | |
- run: echo "APP_VERSION=$(python setup.py --version)" >> $GITHUB_ENV | |
- run: echo app version is $APP_VERSION | |
- id: set-version | |
run: echo "::set-output name=version::$APP_VERSION" | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python3 -m venv venv | |
. venv/bin/activate | |
pip install setuptools wheel twine | |
pip install -r requirements.txt | |
- name: verify git tag vs. version | |
run: | | |
python3 -m venv venv | |
. venv/bin/activate | |
python setup.py verify | |
- name: Build | |
run: | | |
. venv/bin/activate | |
python setup.py bdist_wheel --universal | |
- name: Publish | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_APIKEY }} | |
run: | | |
. venv/bin/activate | |
twine upload dist/* | |
container-build: | |
needs: version | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: echo version ${{needs.version.outputs.app-version}} | |
- run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
- name: build & push image | |
run: | | |
IMAGE_ID=ghcr.io/duke-gcb/calrissian/calrissian | |
docker build . --file Dockerfile --tag calrissian | |
docker tag calrissian $IMAGE_ID:${{needs.version.outputs.app-version}} | |
docker push $IMAGE_ID:${{needs.version.outputs.app-version}} | |