Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix yml for Release and Publication of the lib #34

Closed
fazedordecodigo opened this issue Feb 14, 2024 · 0 comments
Closed

Fix yml for Release and Publication of the lib #34

fazedordecodigo opened this issue Feb 14, 2024 · 0 comments

Comments

@fazedordecodigo
Copy link
Owner

fazedordecodigo commented Feb 14, 2024

Fix yml for Release and Publication of the lib

Existing flows:

name: Publish

on:
  pull_request_target:
    branches:
      - master
    types:
      - closed
  workflow_dispatch:
    inputs:
      number:
        description: PR number
        required: true
      debug_enabled:
        description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
        required: false
        default: 'false'

jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
    - name: Realiza o checkout
      uses: actions/checkout@v4

    - name: Set up Python
      uses: actions/setup-python@v5
      with:
        python-version: '3.10'
    
    - name: Instala Poetry
      run: curl -sSL https://install.python-poetry.org | python3 -

    - name: Instala dependências
      run: poetry install --no-dev

    - name: Build and publish to pypi
      uses: JRubics/poetry-publish@v2.0
      with:
        pypi_token: ${{ secrets.TOKEN_PYPI_PYFLUNT }}
name: Realease

on:
  pull_request_target:
    branches:
      - master
    types:
      - closed
  workflow_dispatch:
    inputs:
      number:
        description: PR number
        required: true
      debug_enabled:
        description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
        required: false
        default: 'false'

jobs:  
  release:
    runs-on: ubuntu-latest
    permissions:
      contents: write
    steps:
    - name: Realiza o checkout
      uses: actions/checkout@v4

    - name: Set up Python
      uses: actions/setup-python@v5
      with:
        python-version: '3.12'
    
    - name: Install dependencies
      run: pip install toml

    - name: Read version from pyproject.toml
      id: read-version
      run: |
        version=$(python -c 'import toml; print(toml.load("pyproject.toml")["tool"]["poetry"]["version"])')
        printf "LITELLM_VERSION=%s" "$version" >> $GITHUB_ENV
  
    - name: Display version
      run: echo "Current version is $LITELLM_VERSION"

    - name: Create Release
      id: create_release
      uses: joutvhu/create-release@v1
      with:
        tag_name: v2.0.0
        name: Release v2.0.0
        body: |
          # What's Changed
          - Change in structure to closely follow the features available in the original Flunt implementation.
          - Add new feature Credit Card Validation by @fazedordecodigo in #10
          - Update Dockstrings by @fazedordecodigo in #17
          - Update Readme by @fazedordecodigo in #21
          - Update CD by @fazedordecodigo in #22
        draft: false
        prerelease: false
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@fazedordecodigo fazedordecodigo converted this from a draft issue Feb 14, 2024
@fazedordecodigo fazedordecodigo moved this from Proposal to In Progress in PyFlunt Feb 16, 2024
@fazedordecodigo fazedordecodigo self-assigned this Feb 16, 2024
fazedordecodigo added a commit that referenced this issue Feb 17, 2024
fazedordecodigo pushed a commit that referenced this issue Feb 19, 2024
@fazedordecodigo fazedordecodigo moved this from In Progress to Done in PyFlunt Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

1 participant