|
| 1 | +# framework-latest-release |
| 2 | + |
| 3 | +This composite action determines the **openDAQ framework package** to use. |
| 4 | +It supports resolving either the **latest release** from GitHub or a **specific version** provided as input, |
| 5 | +and outputs all required information to download and install the package. |
| 6 | + |
| 7 | +--- |
| 8 | + |
| 9 | +## Inputs |
| 10 | + |
| 11 | +| Name | Required | Default | Description | |
| 12 | +|-------------------------------------|----------|---------|-------------| |
| 13 | +| `opendaq-framework-release-version` | no | `latest`| openDAQ framework version. Use `latest` for the newest release, or provide a specific version (e.g. `3.20.4`). | |
| 14 | +| `win32-force` | no | `false` | On Windows runners, forces `win32` instead of `win64` platform. | |
| 15 | + |
| 16 | +--- |
| 17 | + |
| 18 | +## Outputs |
| 19 | + |
| 20 | +| Name | Description | |
| 21 | +|------------|-------------| |
| 22 | +| `version` | Resolved openDAQ release version (e.g. `3.20.4`). | |
| 23 | +| `platform` | Detected platform string (`ubuntu22.04-x86_64`, `ubuntu22.04-arm64`, `win32`, `win64`). | |
| 24 | +| `packaging`| Package type (`deb` on Linux, `exe` on Windows). | |
| 25 | +| `artefact` | Resolved artefact filename (e.g. `opendaq-3.20.4-win64.exe`). | |
| 26 | +| `scheme` | URI scheme (currently `s3`). | |
| 27 | +| `authority`| Storage authority (S3 bucket name). | |
| 28 | +| `path` | Path inside the bucket (e.g. `releases/v3.20.4/SDK`). | |
| 29 | +| `uri` | Full URI to the artefact (e.g. `s3://bucket/releases/v3.20.4/SDK/opendaq-3.20.4-win64.exe`). | |
| 30 | + |
| 31 | +--- |
| 32 | + |
| 33 | +## Example usage |
| 34 | + |
| 35 | +```yaml |
| 36 | +jobs: |
| 37 | + build: |
| 38 | + runs-on: ubuntu-latest |
| 39 | + steps: |
| 40 | + - name: Checkout |
| 41 | + uses: actions/checkout@v4 |
| 42 | + |
| 43 | + - name: Determine openDAQ framework package |
| 44 | + id: framework |
| 45 | + uses: ./.github/actions/framework-latest-release |
| 46 | + with: |
| 47 | + opendaq-framework-release-version: latest |
| 48 | + |
| 49 | + - name: Print resolved artefact info |
| 50 | + run: | |
| 51 | + echo "Version: ${{ steps.framework.outputs.version }}" |
| 52 | + echo "Platform: ${{ steps.framework.outputs.platform }}" |
| 53 | + echo "Artefact: ${{ steps.framework.outputs.artefact }}" |
| 54 | + echo "URI: ${{ steps.framework.outputs.uri }}" |
| 55 | +``` |
| 56 | +
|
| 57 | +## Notes |
| 58 | +- The action relies on GitHub CLI (gh) and jq. |
| 59 | +- These are pre-installed on GitHub-hosted Ubuntu and Windows runners. |
| 60 | +- On Windows, if you explicitly need a 32-bit package, set win32-force: true. |
| 61 | +- If the latest release cannot be determined, the action fails. |
0 commit comments