Skip to content

Create Release

Create Release #2

Workflow file for this run

name: Create Release
on:
workflow_dispatch:
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build Wheel
run: python -m build --wheel
- name: Get Release Version
run: |
echo "VERSION"=$(grep -i '__version__ = ' cbom/__init__.py | head -1 | tr -d "__version__ = '") >> $GITHUB_ENV
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.VERSION }}
release_name: ${{ env.VERSION }}
- name: Upload Wheel to Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/cryptobom_forge-${{ env.VERSION }}-py3-none-any.whl
asset_name: cryptobom_forge-${{ env.VERSION }}-py3-none-any.whl
asset_content_type: application/x-python-wheel
# - name: Publish Release to PyPI
# env:
# TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
# TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
# run: |
# twine upload dist/*