Skip to content

Commit

Permalink
feat: use automatically updated default version
Browse files Browse the repository at this point in the history
  • Loading branch information
eifinger committed May 10, 2024
1 parent 787604a commit f7b7c50
Show file tree
Hide file tree
Showing 10 changed files with 35,179 additions and 10 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/test-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
- name: Setup rye
uses: ./
with:
version: latest
working-directory: __tests__/fixtures/rye-project
github-token: ${{ secrets.GITHUB_TOKEN }}
enable-cache: ${{ matrix.enable-cache }}
Expand All @@ -50,6 +51,8 @@ jobs:
- uses: actions/checkout@v4
- name: Setup rye
uses: ./
with:
version: latest
- run: rye sync
working-directory: __tests__/fixtures/rye-project
test-latest-with-uv:
Expand All @@ -58,6 +61,8 @@ jobs:
- uses: actions/checkout@v4
- name: Setup rye
uses: ./
with:
version: latest
- run: |
rye config --set-bool behavior.use-uv=true
rye sync
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,19 @@ jobs:
npm install
- run: |
npm run all
test-default-version:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, oracle-aarch64]
steps:
- uses: actions/checkout@v4
- name: Install default version
uses: ./
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- run: |
which rye
test-specific-version:
runs-on: ${{ matrix.os }}
strategy:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: '20'
- run: node dist/update-checksums/index.js src/checksums.ts ${{ secrets.GITHUB_TOKEN }}
- name: Update default version and checksums
id: update-default-version
run: node dist/update-default-version/index.js src/checksums.ts action.yml ${{ secrets.GITHUB_TOKEN }}
- run: npm install && npm run all
- name: Create Pull Request
uses: peter-evans/create-pull-request@70a41aba780001da0a30141984ae2a0c95d8704e # v6.0.2
with:
commit-message: "chore: update checksums"
title: "chore: update checksums"
body: "chore: update checksums"
title: "chore: update default version to ${{ steps.update-default-version.outputs.latest-version }}"
body: "chore: update default version to ${{ steps.update-default-version.outputs.latest-version }}"
base: main
labels: automated-pr
branch: update-checksums-pr
Expand Down
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,24 @@ Example workflow can be found [in this repo](https://github.com/eifinger/pywaze/
uses: eifinger/setup-rye@v2
```
### Install latest version
By default this action installs the version defined as `default` in `action.yml`.
This gets automatically updated in a new release of this action when a new version of rye is released.
If you don't want to wait for a new release of this action you can use use `version: latest`.

> [!WARNING]
> Using the `latest` version means that the rye executable gets downloaded every single time instead of loaded from the tools cache.
> This can take up to 20s depending on the download speed.
> This does not affect the cached version of `.venv` when caching is enabled.

```yaml
- name: Install a specific version
uses: eifinger/setup-rye@v2
with:
version: 'latest'
```

### Install specific version

You can also specify a specific version of rye
Expand Down
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ author: 'eifinger'
inputs:
version:
description: 'The version of rye to install'
default: 'latest'
default: '0.33.0'
checksum:
description: 'The checksum of the rye version to install'
required: false
Expand Down Expand Up @@ -34,4 +34,4 @@ runs:
post: 'dist/save-cache/index.js'
branding:
icon: 'package'
color: 'blue'
color: 'blue'
Loading

0 comments on commit f7b7c50

Please sign in to comment.