From 0f3a9bf03fd3a7bf8c25ba138f926e3ea83b56eb Mon Sep 17 00:00:00 2001 From: elmsdata Date: Tue, 4 Apr 2023 14:18:17 -0500 Subject: [PATCH 1/2] created automated release to github --- .github/workflows/pypi-release.yml | 44 +++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 13 deletions(-) diff --git a/.github/workflows/pypi-release.yml b/.github/workflows/pypi-release.yml index 8ebf355..461eabf 100644 --- a/.github/workflows/pypi-release.yml +++ b/.github/workflows/pypi-release.yml @@ -3,7 +3,7 @@ name: PyPI-Release on: push: branches: - - master + - main jobs: build-and-publish: @@ -13,16 +13,34 @@ jobs: - name: Set up Python uses: actions/setup-python@v1 with: - python-version: "3.x" - - name: Install build dependencies - run: pip install -U setuptools wheel build - - name: Build - run: python -m build . - - name: Publish - uses: pypa/gh-action-pypi-publish@master + python-version: "3.9" + - name: Set Release Version + run: echo "RELEASE=$(grep 'version' pyproject.toml | cut -d \" -f2)" >> $GITHUB_ENV + - name: Set up npm + uses: actions/setup-node@v2 with: - password: ${{ secrets.pypi_password }} - - name: Install GitPython and cdevents for pypi_packaging - run: pip install -U -r requirements/publish.txt - - name: Create Tag - run: python pypi_packaging.py + node-version: '12' + - run: git config --global user.email "actions@users.noreply.github.com" + - run: git config --global user.name "GitHub Actions" + - name: Install github-changes + run: | + npm install -g github-changes + - name: Generate Changelog + run: | + github-changes -o ${GITHUB_REPOSITORY///*} -r ${GITHUB_REPOSITORY##*/} -a --only-pulls --use-commit-body -k ${{ secrets.GITHUB_TOKEN }} -b main -n "${{ env.RELEASE }}" -m "(YYYY-MM-DD)" -t "Changelog" -f "CHANGELOG.md" + git add CHANGELOG.md + git commit -m "Updated CHANGELOG.md" + - name: Push changes to release branch + run: | + git push origin main + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: "${{ env.RELEASE }}" + release_name: "Release ${{ env.RELEASE }}" + body_path: "CHANGELOG.md" + draft: false + prerelease: false From f7c45d59313e8391c0ec715e6a8589c4c52901b3 Mon Sep 17 00:00:00 2001 From: elmsdata Date: Tue, 4 Apr 2023 14:19:28 -0500 Subject: [PATCH 2/2] reset version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d3c8817..6236f0a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "cdevents-sdk" -version = "0.0.1" +version = "0.0.0" authors = [ { name="Erik Sternerson", email="erik@sternerson.se" }, { name="Evan Elms", email="evanmelms@gmail.com" }