https://github.com/webfreak001/dub-upgrade
Run `dub upgrade` trying to repeat on network failure and using package cache on GitHub Actions
https://github.com/webfreak001/dub-upgrade
Last synced: 3 months ago
JSON representation
Run `dub upgrade` trying to repeat on network failure and using package cache on GitHub Actions
- Host: GitHub
- URL: https://github.com/webfreak001/dub-upgrade
- Owner: WebFreak001
- Created: 2020-07-31T19:25:27.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-07-11T03:38:02.000Z (about 3 years ago)
- Last Synced: 2025-01-11T04:12:58.224Z (over 1 year ago)
- Language: JavaScript
- Size: 2.35 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# dub-upgrade
GitHub Actions CI Action to run `dub upgrade --missing-only --sub-packages` with automatic retry on network failure and caching package downloads and optionally also compiled library binaries across builds using dub's native caching functionality.
## v0.2 -> v0.3 Changes
The action no longer runs `dub upgrade` to fetch the latest version from DUB without any `args` passed in. It now runs `dub upgrade --missing-only --sub-packages` which has 2 key differences:
* Only the version specified in `dub.selections.json` is fetched now (no longer changing the version of the lockfile)
* All sub-packages are also fetched automatically now
This can be configured using `args` like described below.
## Usage
Basic usage (including cache):
```yml
steps:
- uses: actions/checkout@v5
- uses: dlang-community/setup-dlang@v2 # install D compiler & DUB
with:
compiler: dmd-latest
- uses: WebFreak001/dub-upgrade@v0.3.0
- name: Run tests # do whatever with fetched dependencies
run: dub test
```
Not using cache, only retrying on network failure:
```yml
steps:
- uses: actions/checkout@v5
- uses: dlang-community/setup-dlang@v2 # install D compiler & DUB
with:
compiler: dmd-latest
- uses: WebFreak001/dub-upgrade@v0.3.0
with:
cache: false
- name: Run tests # do whatever with fetched dependencies
run: dub test
```
Old behavior, not respecting dub.selections.json:
```yml
steps:
- uses: actions/checkout@v5
- uses: dlang-community/setup-dlang@v2 # install D compiler & DUB
with:
compiler: dmd-latest
- uses: WebFreak001/dub-upgrade@v0.3.0
with:
args: ''
- name: Run tests # do whatever with fetched dependencies
run: dub test
```