v1.3.1 #9
Workflow file for this run
This file contains 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
# Taken from https://github.com/brianferguson/auto-rmskin-package/blob/e4810692822c8e1b9ed3b89993ed9a50d2a8f251/.github/workflows/release.yml | |
name: auto-rmskin-package | |
on: | |
release: | |
types: | |
- created | |
jobs: | |
package: | |
runs-on: windows-latest | |
permissions: | |
contents: write | |
outputs: | |
target: ${{ steps.create_rmskin.outputs.target }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Create rmskin | |
shell: powershell | |
id: create_rmskin | |
run: | | |
Write-Output "Compressing archive: RMSKIN/*" | |
$target = "${{ github.event.repository.name }}_${{ github.event.release.tag_name }}.zip" | |
Compress-Archive -Path ./RMSKIN/* -DestinationPath $target | |
Write-Output "Archive: $target" | |
Write-Output "Writing footer..." | |
$size = [long](Get-Item $target).length | |
$size_bytes = [System.BitConverter]::GetBytes($size) | |
Add-Content -Path $target -Value $size_bytes -Encoding Byte | |
$flags = [byte]0 | |
Add-Content -Path $target -Value $flags -Encoding Byte | |
$rmskin = [string]"RMSKIN`0" | |
Add-Content -Path $target -Value $rmskin -NoNewLine -Encoding ASCII | |
Write-Output "Changing .zip to .rmskin" | |
Rename-Item -Path $target -NewName ([io.path]::ChangeExtension($target, '.rmskin')) | |
$target = $target.Replace(".zip", ".rmskin") | |
Write-Output "File to upload: $target" | |
echo "::set-output name=target::$target" | |
- name: Upload rmskin | |
id: upload_rmskin | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_name: ${{ steps.create_rmskin.outputs.target }} | |
asset_path: ${{ steps.create_rmskin.outputs.target }} | |
asset_content_type: application/octet-stream |