Skip to content

Commit

Permalink
chore: release workflow now zipping published files
Browse files Browse the repository at this point in the history
  • Loading branch information
Elagoht committed May 25, 2024
1 parent e8d533b commit 2ebb8f1
Showing 1 changed file with 19 additions and 13 deletions.
32 changes: 19 additions & 13 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,17 @@ jobs:
- name: Publish
run: dotnet publish --configuration Release --runtime ${{ matrix.rid }} --self-contained --output ./publish

- name: Zip published files
run: |
cd publish
zip -r ../${{ matrix.os }}-${{ matrix.architecture }}-artifact.zip .
shell: bash

- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.os }}-${{ matrix.architecture }}-artifact
path: ./publish
path: ./${{ matrix.os }}-${{ matrix.architecture }}-artifact.zip

release:
runs-on: ubuntu-latest
Expand All @@ -70,37 +76,37 @@ jobs:
uses: actions/download-artifact@v2
with:
name: ubuntu-latest-x64-artifact
path: ./artifacts/linux-x64
path: ./artifacts/linux-x64.zip

- name: Download artifacts (Linux ARM64)
uses: actions/download-artifact@v2
with:
name: ubuntu-latest-arm64-artifact
path: ./artifacts/linux-arm64
path: ./artifacts/linux-arm64.zip

- name: Download artifacts (Windows x64)
uses: actions/download-artifact@v2
with:
name: windows-latest-x64-artifact
path: ./artifacts/windows-x64
path: ./artifacts/windows-x64.zip

- name: Download artifacts (Windows ARM64)
uses: actions/download-artifact@v2
with:
name: windows-latest-arm64-artifact
path: ./artifacts/windows-arm64
path: ./artifacts/windows-arm64.zip

- name: Download artifacts (macOS x64)
uses: actions/download-artifact@v2
with:
name: macos-latest-x64-artifact
path: ./artifacts/macos-x64
path: ./artifacts/macos-x64.zip

- name: Download artifacts (macOS ARM64)
uses: actions/download-artifact@v2
with:
name: macos-latest-arm64-artifact
path: ./artifacts/macos-arm64
path: ./artifacts/macos-arm64.zip

- name: Determine if Pre-release
id: prerelease_check
Expand All @@ -126,7 +132,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./artifacts/linux-x64
asset_path: ./artifacts/linux-x64.zip
asset_name: linux-x64.zip
asset_content_type: application/zip

Expand All @@ -136,7 +142,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./artifacts/linux-arm64
asset_path: ./artifacts/linux-arm64.zip
asset_name: linux-arm64.zip
asset_content_type: application/zip

Expand All @@ -146,7 +152,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./artifacts/windows-x64
asset_path: ./artifacts/windows-x64.zip
asset_name: windows-x64.zip
asset_content_type: application/zip

Expand All @@ -156,7 +162,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./artifacts/windows-arm64
asset_path: ./artifacts/windows-arm64.zip
asset_name: windows-arm64.zip
asset_content_type: application/zip

Expand All @@ -166,7 +172,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./artifacts/macos-x64
asset_path: ./artifacts/macos-x64.zip
asset_name: osx-x64.zip
asset_content_type: application/zip

Expand All @@ -176,6 +182,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./artifacts/macos-arm64
asset_path: ./artifacts/macos-arm64.zip
asset_name: osx-arm64.zip
asset_content_type: application/zip

0 comments on commit 2ebb8f1

Please sign in to comment.