Adjust version info message #818
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
name: "Build xPilot (Release)" | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- "v*" | |
jobs: | |
windows: | |
uses: ./.github/workflows/windows.yml | |
secrets: inherit | |
macos: | |
uses: ./.github/workflows/macos.yml | |
secrets: inherit | |
linux: | |
uses: ./.github/workflows/linux.yml | |
secrets: inherit | |
########################## Create Release ########################## | |
release: | |
runs-on: ubuntu-latest | |
needs: [linux, windows, macos] | |
if: github.ref_type == 'tag' && contains(github.ref_name, 'v') | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v3 | |
- name: Get version | |
id: get_version | |
uses: battila7/get-version-action@v2 | |
- name: Reorganize | |
run: mv xPilot*/* . && rmdir xPilot*/ | |
- name: Merge artifacts | |
run: | | |
mkdir -p artifacts/Linux && mv Linux.zip/* artifacts/Linux | |
mkdir -p artifacts/Windows && mv Windows.zip/* artifacts/Windows | |
mkdir -p artifacts/macOS && mv macOS.zip/* artifacts/macOS | |
cd artifacts && zip -r ../Artifacts-${{ steps.get_version.outputs.version-without-v }}.zip . | |
- name: Create release notes | |
run: | | |
cat > CHANGELOG.txt << EOF | |
## Download | |
- [Windows](https://github.com/xpilot-project/xpilot/releases/download/${{ steps.get_version.outputs.version }}/xPilot-${{ steps.get_version.outputs.version-without-v }}-Windows.exe) | |
- [macOS](https://github.com/xpilot-project/xpilot/releases/download/${{ steps.get_version.outputs.version }}/xPilot-${{ steps.get_version.outputs.version-without-v }}-MacOS.dmg) | |
- [Linux](https://github.com/xpilot-project/xpilot/releases/download/${{ steps.get_version.outputs.version }}/xPilot-${{ steps.get_version.outputs.version-without-v }}-Linux.run) | |
--- | |
### Added | |
### Changed | |
### Fixed | |
EOF | |
- name: Create release | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
name: xPilot ${{ steps.get_version.outputs.version }} | |
prerelease: true | |
draft: true | |
body_path: CHANGELOG.txt | |
files: | | |
xPilot* | |
Artifacts*.zip |