Skip to content

Commit

Permalink
update release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
sjrc6 committed Nov 27, 2024
1 parent 99ee029 commit c5a412b
Showing 1 changed file with 23 additions and 9 deletions.
32 changes: 23 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,35 +13,49 @@ on:
body:
description: 'Release description'
required: false

env:
BUILD_PREFIX: ddnet

run_id:
description: 'Run ID of the build workflow to download artifacts from'
required: true

jobs:
release:
runs-on: ubuntu-latest

env:
BUILD_PREFIX: ddnet
TARGET_REPOSITORY: ${{ github.repository }}

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Download Ubuntu artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ env.BUILD_PREFIX }}-ubuntu-latest
path: ./artifacts/
github-token: ${{ secrets.GH_PAT }}
repository: ${{ env.TARGET_REPOSITORY }}
run-id: ${{ github.event.inputs.run_id }}

- name: Download Windows artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ env.BUILD_PREFIX }}-windows-latest
path: ./artifacts/
github-token: ${{ secrets.GH_PAT }}
repository: ${{ env.TARGET_REPOSITORY }}
run-id: ${{ github.event.inputs.run_id }}

- name: Download macOS artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ env.BUILD_PREFIX }}-macos-latest
path: ./artifacts/
github-token: ${{ secrets.GH_PAT }}
repository: ${{ env.TARGET_REPOSITORY }}
run-id: ${{ github.event.inputs.run_id }}

- name: Create Release
id: create_release
Expand All @@ -57,22 +71,22 @@ jobs:
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_path: ./artifacts/${{ 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_path: ./artifacts/${{ 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_path: ./artifacts/${{ env.BUILD_PREFIX }}-macos-latest.zip
asset_name: ${{ env.BUILD_PREFIX }}-macos-latest.zip
asset_content_type: application/zip

0 comments on commit c5a412b

Please sign in to comment.