Create Release #1
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
# .github/workflows/release.yml | |
name: Create Release | |
on: | |
workflow_dispatch: | |
inputs: | |
tag_name: | |
description: 'Tag for the release (e.g., v1.0.0)' | |
required: true | |
release_name: | |
description: 'Name of the release' | |
required: true | |
body: | |
description: 'Release description' | |
required: false | |
env: | |
BUILD_PREFIX: ddnet | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Download Ubuntu artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: ${{ env.BUILD_PREFIX }}-ubuntu-latest | |
path: ./artifacts/ | |
- name: Download Windows artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: ${{ env.BUILD_PREFIX }}-windows-latest | |
path: ./artifacts/ | |
- name: Download macOS artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: ${{ env.BUILD_PREFIX }}-macos-latest | |
path: ./artifacts/ | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
with: | |
tag_name: ${{ github.event.inputs.tag_name }} | |
release_name: ${{ github.event.inputs.release_name }} | |
body: ${{ github.event.inputs.body }} | |
draft: false | |
prerelease: false | |
- name: Upload Ubuntu | |
uses: actions/upload-release-asset@v1 | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./artifacts/ubuntu/${{ env.BUILD_PREFIX }}-ubuntu-latest.zip | |
asset_name: ${{ env.BUILD_PREFIX }}-ubuntu-latest.zip | |
asset_content_type: application/zip | |
- name: Upload Windows | |
uses: actions/upload-release-asset@v1 | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./artifacts/windows/${{ env.BUILD_PREFIX }}-windows-latest.zip | |
asset_name: ${{ env.BUILD_PREFIX }}-windows-latest.zip | |
asset_content_type: application/zip | |
- name: Upload macOS | |
uses: actions/upload-release-asset@v1 | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./artifacts/macos/${{ env.BUILD_PREFIX }}-macos-latest.zip | |
asset_name: ${{ env.BUILD_PREFIX }}-macos-latest.zip | |
asset_content_type: application/zip |