From 77d0b367176a5729fa82d5b78556229544a6cdab Mon Sep 17 00:00:00 2001 From: PCain02 Date: Mon, 28 Oct 2024 10:20:47 -0400 Subject: [PATCH 01/11] feat: add publish.yml for automatic publishing with version tags --- .github/workflows/publish.yml | 61 +++++++++++++++++++++++++++-------- 1 file changed, 47 insertions(+), 14 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9f25e308..e303ee4a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,24 +1,57 @@ +# Publishing workflow + name: 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: - release: - types: [created] + push: + tags: + - 'v*' + +# Create one single job +# that publishes the package +# to PyPI using Poetry jobs: publish: runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - name: Set up Python 3.10 - uses: actions/setup-python@v2 + - name: Checkout code + uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 with: - python-version: '3.10' - - name: Publish + 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: | - pip install poetry - poetry version ${GITHUB_REF##*/v} - poetry publish --build - env: - POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }} + 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 From d86310426b6c046da2f8ed3dfe7e6e8a1b9d58a3 Mon Sep 17 00:00:00 2001 From: PCain02 Date: Mon, 28 Oct 2024 10:21:45 -0400 Subject: [PATCH 02/11] feat: add test_publish.yml for automatic test publishing with version tags --- .github/workflows/test_publish.yml | 60 ++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 .github/workflows/test_publish.yml 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 From e343e5024d938108935939fcc588f157bf9b2496 Mon Sep 17 00:00:00 2001 From: PCain02 Date: Mon, 28 Oct 2024 10:33:57 -0400 Subject: [PATCH 03/11] Chore: Bump version to 0.7.1 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 36a44540..910cdccd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [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"] readme = "README.md" From 8305d6580a9ee13c2ef9cc48bf5630757e0e6299 Mon Sep 17 00:00:00 2001 From: PCain02 Date: Mon, 28 Oct 2024 18:40:32 -0400 Subject: [PATCH 04/11] chore: restore toml file to correct version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 910cdccd..36a44540 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "gatorgrade" -version = "0.7.1" +version = "0.7.0" 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"] readme = "README.md" From 33714c5868d60a8c7e57a25fa396b591288157d9 Mon Sep 17 00:00:00 2001 From: PCain02 Date: Mon, 28 Oct 2024 18:51:22 -0400 Subject: [PATCH 05/11] feat: add back old publish workflow and change the name of the tag_publish workflow so both exist --- .github/workflows/publish.yml | 61 +++++++------------------------ .github/workflows/tag_publish.yml | 57 +++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+), 47 deletions(-) create mode 100644 .github/workflows/tag_publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e303ee4a..334e19b3 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,57 +1,24 @@ -# Publishing workflow - name: 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 + release: + types: [created] jobs: publish: runs-on: ubuntu-latest + steps: - - name: Checkout code - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v4 + - name: Checkout repository + uses: actions/checkout@v2 + - name: Set up Python 3.10 + uses: actions/setup-python@v2 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 + python-version: '3.10' + - name: Publish 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 + pip install poetry + poetry version ${GITHUB_REF##*/v} + poetry publish --build + env: + POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_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..e303ee4a --- /dev/null +++ b/.github/workflows/tag_publish.yml @@ -0,0 +1,57 @@ +# Publishing workflow + +name: 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 From fe611111a5c4fec622a07100467d753044181c3f Mon Sep 17 00:00:00 2001 From: PCain02 Date: Mon, 28 Oct 2024 18:58:35 -0400 Subject: [PATCH 06/11] test: test new pypi token --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 36a44540..25b3c2b1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "gatorgrade" -version = "0.7.0" +version = "0.7.2" 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"] readme = "README.md" From 2eefd6ca83f2d4423c1c6e468ed300e71a826e54 Mon Sep 17 00:00:00 2001 From: Pallas Cain <89534001+PCain02@users.noreply.github.com> Date: Mon, 28 Oct 2024 19:02:49 -0400 Subject: [PATCH 07/11] Fix: Update tag_publish.yml to display Tag Publish as workflow name --- .github/workflows/tag_publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tag_publish.yml b/.github/workflows/tag_publish.yml index e303ee4a..b0d82ac7 100644 --- a/.github/workflows/tag_publish.yml +++ b/.github/workflows/tag_publish.yml @@ -1,6 +1,6 @@ # Publishing workflow -name: Publish +name: Tag Publish # Use more columns for terminal output env: @@ -54,4 +54,4 @@ jobs: echo "Package gatorgrade version $version was not found on PyPI." exit 1 fi - \ No newline at end of file + From 91548c5147fb413946851920c0ddabb7268e7011 Mon Sep 17 00:00:00 2001 From: PCain02 Date: Thu, 21 Nov 2024 17:25:11 -0500 Subject: [PATCH 08/11] feat: add release and test-release workflow --- .github/workflows/release.yml | 32 ++++++++++++++++++++++++++++++ .github/workflows/test-release.yml | 32 ++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 .github/workflows/release.yml create mode 100644 .github/workflows/test-release.yml 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/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 }} From 849eb35e7c8c9ee6a73c53e49eab5e0dc3eae5df Mon Sep 17 00:00:00 2001 From: Pallas Cain <89534001+PCain02@users.noreply.github.com> Date: Thu, 21 Nov 2024 17:30:25 -0500 Subject: [PATCH 09/11] Chore: Update pyproject.toml to 0.7.1 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 25b3c2b1..910cdccd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "gatorgrade" -version = "0.7.2" +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"] readme = "README.md" From 65a077f9dbb800631081c23982bfec472ecaeca2 Mon Sep 17 00:00:00 2001 From: Pallas Cain <89534001+PCain02@users.noreply.github.com> Date: Thu, 21 Nov 2024 17:31:14 -0500 Subject: [PATCH 10/11] Chore: Update pyproject.toml to include my name --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 910cdccd..a1d48bbd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ name = "gatorgrade" 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] From 1e560fecf7755a9947853fc3ca5ea8b777635c88 Mon Sep 17 00:00:00 2001 From: Pallas Cain <89534001+PCain02@users.noreply.github.com> Date: Thu, 21 Nov 2024 17:37:01 -0500 Subject: [PATCH 11/11] Fix: Rename test-release.yml to test_release.yml to be consistent --- .github/workflows/{test-release.yml => test_release.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{test-release.yml => test_release.yml} (100%) diff --git a/.github/workflows/test-release.yml b/.github/workflows/test_release.yml similarity index 100% rename from .github/workflows/test-release.yml rename to .github/workflows/test_release.yml