https://github.com/perfectslayer/download-release-action
Update download releases to latest available
https://github.com/perfectslayer/download-release-action
Last synced: about 1 year ago
JSON representation
Update download releases to latest available
- Host: GitHub
- URL: https://github.com/perfectslayer/download-release-action
- Owner: PerfectSlayer
- License: apache-2.0
- Created: 2022-08-29T08:58:59.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-03-06T16:14:22.000Z (over 3 years ago)
- Last Synced: 2024-05-01T20:04:59.337Z (about 2 years ago)
- Language: TypeScript
- Homepage:
- Size: 1.51 MB
- Stars: 2
- Watchers: 1
- Forks: 2
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Download Release Action
This GitHub action updates meta releases, called _download releases_, to always provide the latest version for download.
## Principle
The action scans for published non-draft releases with tags `vX.Y.Z`, find the latest for each major `X` version, and ensure the related _download releases_ tagged `download-latest_vX` and `download-latest` refer to their latest versions.
If not, it downloads the `dd-java-agent.jar `attachment from the latest version, upload it to the _download releases_ and update their bodies to refer to their latest versions.
## Usage
Add the action in your workflow as any other action:
```yaml
jobs:
update-download-release:
name: Update download releases
runs-on: ubuntu-latest
steps:
- name: Update releases
uses: DataDog/download-release-action@latest
```
The action has two inputs:
* `github-token` to provide a custom GitHub token (default `${{ github.token }}`),
* `debug` to log all GitHub client calls (default `false`).
They can be configured with a `with` map:
```yaml
- name: Update releases
uses: DataDog/download-release-action@latest
with:
- github-token: ${{ env.MY_TOKEN }}
- debug: true
```
## Development
> First, you'll need to have a reasonably modern version of `node` handy. This won't work with versions older than 16, for instance.
Install the dependencies
```bash
$ npm install
```
Build the typescript and package it for distribution
```bash
$ npm run build && npm run package
```
Run the tests :heavy_check_mark:
```
$ npm test
```