Skip to content

Commit

Permalink
Merge pull request #322 from CitrineInformatics/split_deploy_workflows
Browse files Browse the repository at this point in the history
Split Deploy Workflows
  • Loading branch information
mVenetos97 authored Oct 1, 2024
2 parents b66833b + ed9ad0d commit 19bdf92
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 25 deletions.
28 changes: 4 additions & 24 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy
name: Deploy-Maven

on:
push:
Expand All @@ -12,9 +12,9 @@ jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v2
uses: actions/setup-java@v4
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: 'adopt'
Expand All @@ -24,24 +24,4 @@ jobs:
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
run: sbt ci-release
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies for PyPI release
run: |
sudo apt-get install -y pandoc
cd python
make
pip install --only-binary=numpy,scipy -r requirements.txt
- name: Build and publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
cd python
python setup.py sdist bdist_wheel
pip install twine
twine upload dist/*
if: startsWith(github.ref, 'refs/tags/')
run: sbt ci-release
18 changes: 18 additions & 0 deletions .github/workflows/deployPyPi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Deploy to PyPI

on:
workflow_call:

jobs:
publish:
name: Publish package to PyPI
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Build
run: python setup.py sdist bdist_wheel
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.11")
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.6.1")
addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.4.1")
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "1.2.0")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6")

0 comments on commit 19bdf92

Please sign in to comment.