Skip to content

Commit b4e24d3

Browse files
authored
Updated release workflow (#1146)
* updated release workflow * changed release workflow to run on uv
1 parent e4d9784 commit b4e24d3

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

.github/workflows/release.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,23 @@ on:
88
jobs:
99
checks:
1010
name: Run checks workflow
11-
uses: TransformerLensOrg/TransformerLens/.github/workflows/checks.yml@main
11+
uses: ./.github/workflows/checks.yml
1212
secrets:
1313
HF_TOKEN: ${{ secrets.HF_TOKEN }}
1414

1515
semver-parser:
1616
name: Parse the semantic version from the release
1717
runs-on: ubuntu-latest
1818
steps:
19-
- name: Set up Python
20-
uses: actions/setup-python@v4
19+
- name: Install uv
20+
uses: astral-sh/setup-uv@v6
2121
with:
22-
python-version: '3.x'
22+
python-version: "3.12"
23+
activate-environment: true
24+
enable-cache: true
2325

2426
- name: Install packaging
25-
run: pip install packaging
27+
run: uv pip install packaging
2628

2729
- name: Parse semver string
2830
id: semver_parser
@@ -31,7 +33,7 @@ jobs:
3133
run: |
3234
VERSION="${RAW_TAG#v}"
3335
echo "Detected version: $VERSION"
34-
echo "::set-output name=version::$(python -c "from packaging.version import Version; print(Version('$VERSION'))")"
36+
echo "version=$(uv run python -c "from packaging.version import Version; print(Version('$VERSION'))")" >> $GITHUB_OUTPUT
3537
outputs:
3638
semver: "${{ steps.semver_parser.outputs.version }}"
3739

@@ -46,13 +48,13 @@ jobs:
4648
- name: Install uv
4749
uses: astral-sh/setup-uv@v6
4850
with:
49-
python-version: '3.11'
51+
python-version: "3.12"
5052
activate-environment: true
5153
enable-cache: true
5254
- name: Install dependencies
5355
run: |
5456
uv lock --check
55-
uv sync --locked
57+
uv sync
5658
- name: Set the version
5759
run: make version-set VERSION=${{needs.semver-parser.outputs.semver}}
5860
- name: re-sync
@@ -61,7 +63,7 @@ jobs:
6163
run: uv build
6264
- name: Publish
6365
run: |
64-
python -m pip install --upgrade twine
65-
twine upload --non-interactive -u __token__ -p "$PYPI_TOKEN_PYPI" dist/*
66+
uv pip install twine
67+
uv run twine upload --non-interactive -u __token__ -p "$PYPI_TOKEN_PYPI" dist/*
6668
env:
6769
PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN_PYPI }}

0 commit comments

Comments
 (0)