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:
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 (defaultfalse
).
They can be configured with a with
map:
- 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
$ npm install
Build the typescript and package it for distribution
$ npm run build && npm run package
Run the tests
$ npm test