An open API service indexing awesome lists of open source software.

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

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
```