Skip to content

Commit

Permalink
feat: testing
Browse files Browse the repository at this point in the history
  • Loading branch information
jjjermiah committed Feb 3, 2024
1 parent 8460f3b commit 3062c12
Showing 1 changed file with 71 additions and 71 deletions.
142 changes: 71 additions & 71 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,80 +67,80 @@ jobs:



# Continuous-Deployment:
# permissions:
# contents: write
# packages: write
# issues: write
# pull-requests: write
Continuous-Deployment:
permissions:
contents: write
packages: write
issues: write
pull-requests: write

# # needs: Continuous-Integration
# needs: Continuous-Integration

# # if pulling to main, deploy to PyPI
# # if: github.ref == 'refs/heads/main'
# if pulling to main, deploy to PyPI
# if: github.ref == 'refs/heads/main'

# # Set up operating system
# runs-on: ubuntu-latest

# # Define job steps
# steps:
# - name: Set up Python 3.12
# uses: actions/setup-python@v2
# with:
# python-version: 3.12

# - name: Check-out repository
# uses: actions/checkout@v2
# with:
# fetch-depth: 0

# - name: Install poetry
# uses: snok/install-poetry@v1

# - name: Install package
# run: poetry install


# # Existing jobs...



# # This action uses Python Semantic Release v8
# # What this action does:
# # - Determines the next version number based on the commit history
# # - Creates a new tag with the new version number
# # - Pushes the new tag to GitHub
# # - Creates a GitHub release with the new version number
# - name: Python Semantic Release
# id: release
# uses: python-semantic-release/python-semantic-release@master
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# git_commit_message: 'chore(release): release ${next_version}'

# - name: Install packaging-related tool
# run:
# python3 -m pip install build twine

# # Build Package step:
# # After semantic release, we should have a new tag if the commit history
# # has been updated. If there isnt a new tag, then we dont need to build
# # a new package. If there is a new tag, then we need to build a new package
# # and publish it to PyPI
# - name: Build package
# if: steps.release.outputs.released == 'true'
# run: |
# poetry version $(git describe --tags --abbrev=0 | sed 's/^v//')
# python -m build --sdist --wheel --outdir dist/ .
# echo "LATEST_TAG=$(poetry version | sed 's/^nbiatoolkit //')" >> "$GITHUB_ENV"
# Set up operating system
runs-on: ubuntu-latest

# - name: Publish package distributions to PyPI
# if: steps.release.outputs.released == 'true'
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# verbose: true
# user: __token__
# password: ${{ secrets.PYPI_API_TOKEN }}
# Define job steps
steps:
- name: Set up Python 3.12
uses: actions/setup-python@v2
with:
python-version: 3.12

- name: Check-out repository
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Install poetry
uses: snok/install-poetry@v1

- name: Install package
run: poetry install


# Existing jobs...



# This action uses Python Semantic Release v8
# What this action does:
# - Determines the next version number based on the commit history
# - Creates a new tag with the new version number
# - Pushes the new tag to GitHub
# - Creates a GitHub release with the new version number
- name: Python Semantic Release
id: release
uses: python-semantic-release/python-semantic-release@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
git_commit_message: 'chore(release): release ${next_version}'

- name: Install packaging-related tool
run:
python3 -m pip install build twine

# Build Package step:
# After semantic release, we should have a new tag if the commit history
# has been updated. If there isnt a new tag, then we dont need to build
# a new package. If there is a new tag, then we need to build a new package
# and publish it to PyPI
- name: Build package
if: steps.release.outputs.released == 'true'
run: |
poetry version $(git describe --tags --abbrev=0 | sed 's/^v//')
python -m build --sdist --wheel --outdir dist/ .
echo "LATEST_TAG=$(poetry version | sed 's/^nbiatoolkit //')" >> "$GITHUB_ENV"
- name: Publish package distributions to PyPI
if: steps.release.outputs.released == 'true'
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

# - name: Print latest tag name
# run: |
Expand Down Expand Up @@ -255,7 +255,7 @@ jobs:
# NBIAToolkit

Update-README:
# needs: Continuous-Deployment
needs: Continuous-Deployment
runs-on: ubuntu-latest
# if: github.ref == 'refs/heads/development'
steps:
Expand Down

0 comments on commit 3062c12

Please sign in to comment.