Skip to content

Commit 266a96e

Browse files
⬆️ CI/CD: Updated
1 parent d030202 commit 266a96e

File tree

2 files changed

+37
-84
lines changed

2 files changed

+37
-84
lines changed

.github/workflows/python-library-rc copy.yml

Lines changed: 0 additions & 82 deletions
This file was deleted.

.github/workflows/python-library-rc.yml

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,16 @@ permissions:
1010

1111
env:
1212
TAG: ${{ github.ref_name }}
13+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1314

1415
jobs:
1516
deployment:
1617
runs-on: ubuntu-latest
1718

1819
steps:
1920
- uses: actions/checkout@v3
21+
with:
22+
repo-token: ${{ secrets.GITHUB_TOKEN }}
2023

2124
- name: 📑 Create tag
2225
run: |
@@ -35,9 +38,41 @@ jobs:
3538
3639
shell: bash
3740

38-
- name: 🚀 Create release
41+
- name: ⚙️ Set up Python 3.11
42+
uses: actions/setup-python@v3
43+
with:
44+
python-version: "3.11"
45+
46+
- name: ⚙️ Install dependencies
47+
run: |
48+
python -m pip install --upgrade pip
49+
pip install tomli-w --no-cache-dir
50+
51+
- name: ✅ Update version
3952
env:
40-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
NEW_TAG: ${{ env.NEW_TAG }}
54+
run: |
55+
python ./.github/python-library-rc.py
56+
57+
- name: 📝 Git Config
58+
run: |
59+
git config --global user.email [email protected]
60+
git config --global user.name 🐧
61+
shell: bash
62+
63+
- name: 📝 Git Process
64+
run: |
65+
if [[ `git status --porcelain` ]]; then
66+
git add --all
67+
git commit -a -m "Updated Version"
68+
git push origin HEAD:$TAG --force
69+
else
70+
echo "WARNING: No changes were detected. git commit push action aborted."
71+
fi
72+
shell: bash
73+
continue-on-error: true
74+
75+
- name: 🚀 Create release
4176
run: |
4277
gh release create $NEW_TAG \
4378
--repo="$GITHUB_REPOSITORY" \

0 commit comments

Comments
 (0)