Skip to content

Commit

Permalink
cd solved
Browse files Browse the repository at this point in the history
  • Loading branch information
Jorgedavyd committed Oct 29, 2024
1 parent 664cfa6 commit 14687b7
Showing 1 changed file with 4 additions and 27 deletions.
31 changes: 4 additions & 27 deletions .github/workflows/CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,22 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'

- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-

- name: Install dependencies
run: |
chmod +x requirements.sh
sudo sh ./requirements.sh
chmod +x ./scripts/cd_requirements.sh
sh ./scripts/cd_requirements.sh
- name: Extract tag name
id: extract_tag
run: echo "TAG_NAME=$(echo $GITHUB_REF | cut -d/ -f3)" >> $GITHUB_ENV

- name: Update version in setup.py and lightorch/_version.py
- name: Update version
run: |
sed -i "s/{{VERSION_PLACEHOLDER}}/${{ env.TAG_NAME }}/g" lightorch/_version.py
Expand All @@ -51,16 +41,3 @@ jobs:
with:
password: ${{ secrets.PYPI_API_TOKEN }}

- name: Clean up
run: rm -rf build dist *.egg-info

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.TAG_NAME }}
release_name: ${{ env.TAG_NAME }}
draft: false
prerelease: false

0 comments on commit 14687b7

Please sign in to comment.