Testing Release #5
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
name: Testing Release | |
on: | |
workflow_dispatch: | |
inputs: | |
commit: | |
description: 'Build Commit Hash or ref' | |
required: true | |
permissions: | |
contents: write | |
jobs: | |
release: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.inputs.commit }} | |
- name: Get short commit hash | |
id: short-hash | |
run: | | |
$short = git rev-parse --short ${{ github.event.inputs.commit }} | |
"sha=$short" >> $env:GITHUB_OUTPUT | |
- name: Get latest stable release tag | |
id: latest-tag | |
uses: actions/github-script@v7 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
script: | | |
const latest = await github.rest.repos.getLatestRelease({ | |
owner: context.repo.owner, | |
repo: context.repo.repo | |
}); | |
return latest.data.tag_name; | |
- name: Set archive name | |
id: archive-name | |
run: | | |
$tag = ${{ steps.latest-tag.outputs.result }} | |
$hash = "${{ steps.short-hash.outputs.sha }}" | |
"name=LLPlayer-testing-$tag-$hash.7z" >> $env:GITHUB_OUTPUT | |
- name: Build & Package | |
uses: ./.github/actions/build-package | |
with: | |
archive-name: ${{ steps.archive-name.outputs.name }} | |
- name: Upload Testing Asset (overwrite) | |
run: | | |
gh release upload v0.0.1 ${{ steps.archive-name.outputs.name }} --clobber | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |