Skip to content

Commit

Permalink
fix: action
Browse files Browse the repository at this point in the history
  • Loading branch information
phi-friday committed Mar 8, 2024
1 parent ae56a98 commit 8b0e2f6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 21 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.install-rye.outputs.python_version }}-${{ hashFiles('**/pyproject.toml') }}
key: venv-${{ runner.os }}-${{ steps.install-rye.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }}

- name: Install dependencies
if: steps.cached-venv-dependencies.outputs.cache-hit != 'true'
Expand All @@ -46,7 +46,7 @@ jobs:
uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: precommit-${{ runner.os }}-${{ steps.install-rye.outputs.python_version }}-${{ hashFiles('.pre-commit-config.yaml') }}
key: precommit-${{ runner.os }}-${{ steps.install-rye.outputs.python-version }}-${{ hashFiles('.pre-commit-config.yaml') }}

- name: Code checks
run: |
Expand Down
24 changes: 5 additions & 19 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,12 @@ jobs:
token: "${{ secrets.GITHUB_TOKEN }}"
fetch-depth: 0

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install rye
env:
RYE_INSTALL_OPTION: '--yes'
run: |
curl -sSf https://rye-up.com/get | bash
echo "$HOME/.rye/shims" >> $GITHUB_PATH
- name: set python version
id: set-python
run: |
rye config --set-bool behavior.use-uv=true
rye pin cpython@${{ matrix.python-version }}
cat .python-version
VERSION=$(cat .python-version)
echo "python_version=${VERSION}" >> $GITHUB_OUTPUT
uses: phi-friday/install-rye@v1
id: install-rye
with:
python_version: ${{ matrix.python-version }}
use_uv: true

- name: Build package
run: |
Expand Down

0 comments on commit 8b0e2f6

Please sign in to comment.