Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 7 additions & 25 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
version:
description: 'Next Version'
required: true
push:
branches:
- "test-push-to-branch"

env:
python_version: '3.x'
Expand All @@ -15,37 +18,16 @@ permissions:

jobs:
release:
runs-on: ubuntu-latest-4core
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.release_token }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: Set author in Git
run: |
git config user.name github-actions
git config user.email github-actions@github.com

- uses: actions/setup-python@v5
with:
python-version: ${{ env.python_version }}

- name: Bump version
run: |
python .scripts/bump.py ${{ github.event.inputs.version }}
git commit --message ${{ github.event.inputs.version }} setup.py
git tag v${{ github.event.inputs.version }}

- uses: ./.github/actions/python-build-publish
with:
repository: testpypi
token: ${{ secrets.test_pypi_token }}

- name: Push release commit
run: git push --tags origin ${{ github.ref_name }}

- uses: ncipollo/release-action@v1
with:
tag: v${{ github.event.inputs.version }}
draft: true
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
git push origin HEAD
Loading