Release v0.8 #17
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Workflow to upload libzim release to master.download.kiwix.org | |
name: Upload release assets to Kiwix | |
on: | |
# Triggers workflow when release is published | |
release: | |
types: [published] | |
# Allows triggering the workflow manually | |
workflow_dispatch: | |
inputs: | |
version: | |
description: | | |
Set the release version whose assets to upload, like v9.9.9 (must be an exisitng release). | |
required: true | |
default: 'v' | |
# Define top-level environment vars we can refer to below | |
env: | |
REPOSITORY: ${{ github.repository }} | |
VERSION: ${{ github.event.release.tag_name }} | |
DISPATCH_VERSION: ${{ github.event.inputs.version }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SSH_KEY: ${{ secrets.SSH_KEY }} | |
jobs: | |
upload: | |
name: Upload assets to server | |
runs-on: windows-latest | |
steps: | |
# Check out the repository | |
- uses: actions/checkout@v4 | |
- name: Find the release, get assets, and upload | |
run: | | |
$repository = $Env:REPOSITORY | |
$version = $Env:VERSION | |
if (! $version) { $version = $Env:DISPATCH_VERSION } | |
if (! $version) { | |
Write-Host "`n** You must set a tag version so that we can find and upload the assets! **`n" -ForegroundColor Red | |
exit 1 | |
} | |
echo "`nUsing tag: $version for version upload`n" | |
$SSH_KEY = $Env:SSH_KEY | |
if (! $SSH_KEY) { | |
Write-Warning "The SSH secret is empty!" | |
} | |
echo "$SSH_KEY" > .\scripts\ssh_key | |
./scripts/Upload-KiwixRelease.ps1 -yes |