Files
xemu/.github/workflows/release.yml
2026-01-04 23:38:25 -07:00

54 lines
1.6 KiB
YAML

name: Release
on:
workflow_call:
inputs:
tag:
description: "Tag to release (e.g. v1.2.3)"
required: true
type: string
jobs:
build:
name: Build
uses: ./.github/workflows/build.yml
with:
ref: ${{ inputs.tag }}
release:
name: Create release
runs-on: ubuntu-latest
needs: build
steps:
- name: Clone tree
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v4
with:
fetch-depth: 0
ref: ${{ inputs.tag }}
- name: Generate Changelog
run: |
PREVIOUS_TAG=$(git describe --tags --match 'v*' --abbrev=0 HEAD^)
git log --pretty=format:'* %h %s' --first-parent $PREVIOUS_TAG..HEAD > CHANGELOG.md
- name: Download artifacts
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v4
with:
path: dist
merge-multiple: true
- name: Add transitionary package aliases
run: |
pushd dist
cp xemu-${{ needs.build.outputs.pkg_version }}-windows-x86_64.zip xemu-win-x86_64-release.zip
cp xemu-${{ needs.build.outputs.pkg_version }}-windows-arm64.zip xemu-win-aarch64-release.zip
- name: Create release draft
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0
with:
name: ${{ inputs.tag }}
tag_name: ${{ inputs.tag }}
body_path: CHANGELOG.md
draft: true
files: |
dist/xemu*.tar.zst
dist/xemu*-win*.zip
dist/xemu*-macos-universal*.zip
dist/xemu*.AppImage