Skip to content

Commit

Permalink
fix: Update archive and upload steps
Browse files Browse the repository at this point in the history
  • Loading branch information
Capella87 committed Nov 26, 2024
1 parent 469c58f commit 2387863
Showing 1 changed file with 20 additions and 19 deletions.
39 changes: 20 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,44 +31,47 @@ jobs:

- name: Publish ${{ matrix.architecture }} (Windows)
if: matrix.architecture == 'win-x64' || matrix.architecture == 'win-arm64'
run: dotnet publish ./src/FixNormalization -c Release -o ./pub/${{ matrix.architecture }} -r ${{ matrix.architecture }} --no-self-contained -v normal
run: dotnet publish ./src/FixNormalization -c Release -o ${{ github.workspace }}/pub/${{ matrix.architecture }} -r ${{ matrix.architecture }} --no-self-contained -v normal

- name: Publish ${{ matrix.architecture }} (Others)
if: matrix.architecture != 'win-x64' && matrix.architecture != 'win-arm64'
run: dotnet publish ./src/FixNormalization -c Release -o ./pub/${{ matrix.architecture }} -r ${{ matrix.architecture }} --self-contained -v normal
run: dotnet publish ./src/FixNormalization -c Release -o ${{ github.workspace }}/pub/${{ matrix.architecture }} -r ${{ matrix.architecture }} --self-contained -v normal

- name: Remove unnecessary files
- name: Remove Unnecessary Files
run: |
pushd
Set-Location -Path ./pub/${{ matrix.architecture }}
cd ${{ github.workspace }}/pub/${{ matrix.architecture }}
Get-ChildItem -Filter *.pdb | Remove-Item -Force
Get-ChildItem -Filter *.deps.json -Recurse | Remove-Item
Get-ChildItem -Filter *.runtimeconfig.json -Recurse | Remove-Item
popd
- name: Archive release ${{ env.release }}
uses: thedoctor0/zip-release@master
with:
filename: './${{ env.release }}.zip'
directory: './pub/${{ matrix.architecture }}'
- name: Upload release ${{ env.release }}
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.release }}-binary
path: ./${{ env.release }}.zip
path: ${{ github.workspace }}/pub/${{ matrix.architecture }}
compression-level: 6
overwrite: true

create-release:
name: Create Release on GitHub
needs: [publish]
runs-on: windows-latest
runs-on: ubuntu-latest
permissions:
contents: write
discussions: write
env:
blobs: '${{ github.workspace }}/blobs'
steps:

- uses: actions/checkout@v4
- uses: actions/download-artifact@v4

- name: Download Artifacts
uses: actions/download-artifact@v4
with:
name: fnorm-${{ github.ref_name }}-*-binary
path: result
pattern: '*-binary'
path: ${{ env.blobs }}
merge-multiple: true

- name: Release
uses: softprops/action-gh-release@v2
Expand All @@ -77,8 +80,6 @@ jobs:
draft: true
token: ${{ secrets.GITHUB_TOKEN }}
files: |
result/*.zip
${{ env.blobs }}/*
make_latest: ${{ !contains(github.ref_name, '-') }}
prerelease: ${{ contains(github.ref_name, '-') }}


0 comments on commit 2387863

Please sign in to comment.