diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9f25e308..334e19b3 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -21,4 +21,4 @@ jobs: poetry version ${GITHUB_REF##*/v} poetry publish --build env: - POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }} + POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..964b92a4 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,32 @@ +# Release workflow + +name: Create Release + +# Use more columns for terminal output +env: + COLUMNS: 120 + PYTHONIOENCODING: utf8 + +# trigger the release of the +# gatorgrade to GitHub +# with any tag starting with 'v' +on: + push: + tags: + - 'v*' + +jobs: + create-release: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Create Release with Auto-Generated Notes + uses: actions/create-release@v1 + with: + tag_name: ${{ github.ref_name }} + release_name: "${{ github.ref_name }}" + generate_release_notes: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/tag_publish.yml b/.github/workflows/tag_publish.yml new file mode 100644 index 00000000..e3e4af3e --- /dev/null +++ b/.github/workflows/tag_publish.yml @@ -0,0 +1,57 @@ +# Publishing workflow + +name: Tag Publish + +# Use more columns for terminal output +env: + COLUMNS: 120 + PYTHONIOENCODING: utf8 + +# trigger the publishing of the +# gatorgrade package to PyPI +# with any tag starting with 'v' +on: + push: + tags: + - 'v*' + +# Create one single job +# that publishes the package +# to PyPI using Poetry + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.12' + - name: Install Poetry + run: | + curl -sSL https://install.python-poetry.org | python3 - + echo "$HOME/.local/bin" >> $GITHUB_PATH + - name: Install dependencies + run: | + poetry install + - name: Configure Poetry for PyPI + run: | + poetry config repositories.pypi https://upload.pypi.org/legacy/ + poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }} + - name: Publish package to PyPI + run: | + poetry publish --repository pypi --build + - name: Check for Successful Publication + run: | + version=$(poetry version --short) + echo "Checking if package gatorgrade version $version is available on PyPI..." + response=$(curl -s "https://pypi.org/pypi/gatorgrade/$version/json") + if echo "$response" | grep -q "$version"; then + echo "Package gatorgrade version $version is successfully published on PyPI." + else + echo "Package gatorgrade version $version was not found on PyPI." + exit 1 + fi + \ No newline at end of file diff --git a/.github/workflows/test_publish.yml b/.github/workflows/test_publish.yml new file mode 100644 index 00000000..a68e73c3 --- /dev/null +++ b/.github/workflows/test_publish.yml @@ -0,0 +1,60 @@ +# Test Publishing workflow +name: Test Publish + +# Use more columns for terminal output +env: + COLUMNS: 120 + PYTHONIOENCODING: utf8 + +# trigger the test publishing of the +# gatorgrade package to PyPI +# with any tag starting with 't' +on: + push: + tags: + - 't*' + +# Create one single job +# that test publishes the package +# to PyPI using Poetry +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '^3.11' # Use the Python version compatible with your project + + - name: Install Poetry + run: | + curl -sSL https://install.python-poetry.org | python3 - + echo "$HOME/.local/bin" >> $GITHUB_PATH + + - name: Install dependencies + run: | + poetry install + + - name: Configure Poetry for TestPyPI + run: | + poetry config repositories.testpypi https://test.pypi.org/legacy/ + poetry config pypi-token.testpypi ${{ secrets.TEST_PYPI_TOKEN }} + + - name: Publish package to TestPyPI + run: | + poetry publish --repository testpypi --build + + - name: Check for Successful Publication + run: | + version=$(poetry version --short) + echo "Checking if package gatorgrade version $version is available on TestPyPI..." + response=$(curl -s "https://test.pypi.org/pypi/gatorgrade/$version/json") + if echo "$response" | grep -q "$version"; then + echo "Package gatorgrade version $version is successfully published on TestPyPI." + else + echo "Package gatorgrade version $version was not found on TestPyPI." + exit 1 + fi \ No newline at end of file diff --git a/.github/workflows/test_release.yml b/.github/workflows/test_release.yml new file mode 100644 index 00000000..759cb50d --- /dev/null +++ b/.github/workflows/test_release.yml @@ -0,0 +1,32 @@ +# Test Release workflow + +name: Create Test Release + +# Use more columns for terminal output +env: + COLUMNS: 120 + PYTHONIOENCODING: utf8 + +# trigger the test release of the +# gatorgrade package to GitHub +# with any tag starting with 'r' +on: + push: + tags: + - 't*' + +jobs: + create-release: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Create Release with Auto-Generated Notes + uses: actions/create-release@v1 + with: + tag_name: ${{ github.ref_name }} + release_name: "${{ github.ref_name }}" + generate_release_notes: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/pyproject.toml b/pyproject.toml index 36a44540..a1d48bbd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,8 +1,8 @@ [tool.poetry] name = "gatorgrade" -version = "0.7.0" +version = "0.7.1" description = "GatorGrade executes GatorGrader checks!" -authors = ["Michael Abraham", "Jacob Allebach", "Liam Black", "Katherine Burgess", "Yanqiao Chen", "Ochirsaikhan Davaajambal", "Tuguldurnemekh Gantulga", "Anthony Grant-Cook", "Dylan Holland", "Gregory M. Kapfhammer", "Peyton Kelly", "Luke Lacaria", "Lauren Nevill", "Rebekah Rudd", "Jack Turner", "Daniel Ullrich", "Garrison Vanzin", "Rian Watson"] +authors = ["Michael Abraham", "Jacob Allebach", "Liam Black", "Katherine Burgess", "Pallas-Athena Cain", "Yanqiao Chen", "Ochirsaikhan Davaajambal", "Tuguldurnemekh Gantulga", "Anthony Grant-Cook", "Dylan Holland", "Gregory M. Kapfhammer", "Peyton Kelly", "Luke Lacaria", "Lauren Nevill", "Rebekah Rudd", "Jack Turner", "Daniel Ullrich", "Garrison Vanzin", "Rian Watson"] readme = "README.md" [tool.poetry.dependencies]