Skip to content

Commit

Permalink
organize
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-eyes committed Oct 21, 2024
1 parent 069c0d9 commit de005c3
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 65 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,63 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/site
publish_branch: gh-pages

release:
if: contains(github.event.head_commit.message, 'make-a-release')
runs-on: ubuntu-latest
name: Release ${{ github.event.head_commit.id }}
needs: test

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install hatch twine
- name: Extract Version from __init__.py
id: extract_version
run: |
VERSION=$(python -c "import re;
import pathlib;
init_file = pathlib.Path('src/snipe/__init__.py');
content = init_file.read_text();
match = re.search(r'__version__\s*=\s*[\'\"]([^\'\"]+)[\'\"]', content);
print(match.group(1) if match else '0.0.0')")
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Build package
run: |
hatch build
- name: Upload to PyPI Test Server
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }}
run: |
python -m pip install twine
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
- name: Create Git Tag
run: |
git config user.name "GitHub Actions"
git config user.email "[email protected]"
git tag -a "v${{ env.VERSION }}" -m "Release version ${{ env.VERSION }}"
git push origin "v${{ env.VERSION }}"
- name: Create GitHub Release
uses: ncipollo/release-action@v1
with:
tag: "v${{ env.VERSION }}"
name: "v${{ env.VERSION }}"
body: |
Release version ${{ env.VERSION }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

64 changes: 0 additions & 64 deletions .github/workflows/release.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion src/snipe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
from snipe.api.multisig_reference_QC import MultiSigReferenceQC
from snipe.api.reference_QC import ReferenceQC

__version__ = '0.1.1'
__version__ = '0.1.2'

0 comments on commit de005c3

Please sign in to comment.