diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8f75128..7341724 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,18 +38,10 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Test GH_TOKEN permissions - run: | - curl -v -H "Authorization: token ${{ secrets.GH_TOKEN }}" \ - https://api.github.com/repos/${{ github.repository }} - shell: bash - name: Set git user for hawkdeploy run: | - git config user.name "${{ secrets.GH_DEPLOY_USER }}" - git config user.email "${{ secrets.GH_DEPLOY_EMAIL }}" - - name: Set up git for pushing - run: | - git remote set-url origin https://x-access-token:${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }}.git + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" - name: Show git user and remote run: | git config --get user.name @@ -82,11 +74,13 @@ jobs: fetch-depth: 0 - name: Set git user for hawkdeploy run: | - git config user.name "${{ secrets.GH_DEPLOY_USER }}" - git config user.email "${{ secrets.GH_DEPLOY_EMAIL }}" - - name: Set up git for pushing + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + - name: Install dependencies run: | - git remote set-url origin https://${{ secrets.GH_DEPLOY_USER }}:${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }}.git + python -m pip install --upgrade pip + pip install -r requirements.txt + pip install . - name: Bump patch version with bumpver run: bumpver update --patch --commit - name: Push version bump commit diff --git a/.github/workflows/prepare-release.yml b/.github/workflows/prepare-release.yml new file mode 100644 index 0000000..54eb786 --- /dev/null +++ b/.github/workflows/prepare-release.yml @@ -0,0 +1,35 @@ +name: Prepare Release + +on: + workflow_dispatch: + +permissions: + contents: write + +jobs: + bump-minor-version: + name: Bump Minor Version + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: main + fetch-depth: 0 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + pip install . + - name: Set git user for github-actions + run: | + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + - name: Bump minor version with bumpver + run: bumpver update --minor --commit + - name: Push version bump commit + run: | + git push origin HEAD:main \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9845c78..525bf06 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,8 +1,7 @@ name: Release on: - release: - types: [published] + workflow_dispatch: permissions: contents: write @@ -51,11 +50,7 @@ jobs: - name: Install build dependencies run: | python -m pip install --upgrade pip - pip install build bumpver - - name: Set up git for pushing - run: | - git config user.name "github-actions[bot]" - git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + pip install build - name: Build package run: | python -m build @@ -72,10 +67,6 @@ jobs: with: ref: ${{ github.ref }} fetch-depth: 0 - - name: Set up git for pushing - run: | - git config user.name "github-actions[bot]" - git config user.email "41898282+github-actions[bot]@users.noreply.github.com" - name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx