Skip to content

Commit

Permalink
softprops/action-gh-release@v2
Browse files Browse the repository at this point in the history
  • Loading branch information
ptahmose committed Oct 4, 2024
1 parent 3c208c7 commit cbd5d8b
Showing 1 changed file with 40 additions and 31 deletions.
71 changes: 40 additions & 31 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,18 +85,18 @@ jobs:
needs: build
if: inputs.create_release == 'true' # Only run if release is selected
steps:
- name: Create Release
id: create_release
uses: actions/create-release@v1
with:
tag_name: "v1.0.${{ github.run_id }}"
release_name: "Release v1.0.${{ github.run_id }}"
body: |
Release for version v1.0.${{ github.run_id }}
draft: true
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Create Release
# id: create_release
# uses: actions/create-release@v1
# with:
# tag_name: "v1.0.${{ github.run_id }}"
# release_name: "Release v1.0.${{ github.run_id }}"
# body: |
# Release for version v1.0.${{ github.run_id }}
# draft: true
# prerelease: true
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Download All Artifacts
if: needs.build.outputs.linuxx64_artifact != '' || needs.build.outputs.windowsx64_artifact != ''
Expand All @@ -107,24 +107,33 @@ jobs:
- name: Display structure of downloaded files
run: ls -R ./artifacts

- name: Upload Linux Build to Release
if: needs.build.outputs.linuxx64_artifact != ''
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release
uses: softprops/action-gh-release@v2
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./artifacts/${{ needs.build.outputs.linuxx64_artifact }}/MEXlibCZI.mexa64
asset_name: "Linux x64"
asset_content_type: application/zip
files: |
./artifacts/${{ needs.build.outputs.linuxx64_artifact }}/MEXlibCZI.mexa64
./artifacts/${{ needs.build.outputs.windowsx64_artifact }}/MEXlibCZI.mexw64
draft: true
prerelease: true

- name: Upload Windows Build to Release
if: needs.build.outputs.windowsx64_artifact != ''
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./artifacts/${{ needs.build.outputs.windowsx64_artifact }}/MEXlibCZI.mexw64
asset_name: "Windows x64"
asset_content_type: application/zip
# - name: Upload Linux Build to Release
# if: needs.build.outputs.linuxx64_artifact != ''
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# asset_path: ./artifacts/${{ needs.build.outputs.linuxx64_artifact }}/MEXlibCZI.mexa64
# asset_name: "Linux x64"
# asset_content_type: application/zip
#
# - name: Upload Windows Build to Release
# if: needs.build.outputs.windowsx64_artifact != ''
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# asset_path: ./artifacts/${{ needs.build.outputs.windowsx64_artifact }}/MEXlibCZI.mexw64
# asset_name: "Windows x64"
# asset_content_type: application/zip

0 comments on commit cbd5d8b

Please sign in to comment.