Skip to content

Commit

Permalink
Adds abstractions to release artifacts. Closes #613 (#620)
Browse files Browse the repository at this point in the history
* Adds abstractions to release artifacts

* Updates abstractions folder path

* Updates abstractions zip path

* Updates building abstractions

* Updates abstractions artifact name

* Updates build

* Renames abstractions artifact

---------

Co-authored-by: Garry Trinder <[email protected]>
  • Loading branch information
waldekmastykarz and garrytrinder authored Mar 28, 2024
1 parent 7de1226 commit df3f4b5
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ jobs:
- win-x86
- linux-x64
- osx-x64
- osx-arm64
env:
release: 'dev-proxy-${{ matrix.architecture }}-${{ github.ref_name }}'
steps:
Expand All @@ -27,6 +26,9 @@ jobs:
run: dotnet publish ./dev-proxy/dev-proxy.csproj -c Release -p:PublishSingleFile=true -p:InformationalVersion=$("${{ github.ref_name }}".Substring(1)) -r ${{ matrix.architecture }} --self-contained -o ./${{ env.release }}
- name: Build plugins
run: dotnet build ./dev-proxy-plugins/dev-proxy-plugins.csproj -p:InformationalVersion=$("${{ github.ref_name }}".Substring(1)) -c Release -r ${{ matrix.architecture }} --no-self-contained
- name: Build abstractions
if: matrix.architecture == 'win-x64'
run: dotnet build ./dev-proxy-abstractions/dev-proxy-abstractions.csproj -p:InformationalVersion=$("${{ github.ref_name }}".Substring(1)) -c Release --no-self-contained
- name: Add plugins to output
run: cp ./dev-proxy/bin/Release/net8.0/${{ matrix.architecture }}/plugins ./${{ env.release }} -r
- name: Remove unnecessary files
Expand All @@ -37,15 +39,29 @@ jobs:
Get-ChildItem -Filter *.deps.json -Recurse | Remove-Item
Get-ChildItem -Filter *.runtimeconfig.json -Recurse | Remove-Item
popd
- name: Archive Release ${{ env.release }}
- name: Archive release ${{ env.release }}
uses: thedoctor0/zip-release@master
with:
filename: '../${{ env.release }}.zip'
directory: './${{ env.release }}'
- uses: actions/upload-artifact@v4
- name: Upload release
uses: actions/upload-artifact@v4
with:
name: binaries-${{ env.release }}
path: ./${{ env.release }}.zip
- name: Archive abstractions
if: matrix.architecture == 'win-x64'
uses: thedoctor0/zip-release@master
with:
filename: '../../../../dev-proxy-abstractions-${{ github.ref_name }}.zip'
directory: './dev-proxy-abstractions/bin/Release/net8.0'
exclusions: '*.json'
- name: Upload abstractions
if: matrix.architecture == 'win-x64'
uses: actions/upload-artifact@v4
with:
name: binaries-dev-proxy-abstractions-${{ github.ref_name }}
path: ./dev-proxy-abstractions-${{ github.ref_name }}.zip
create_release:
name: Create Release
needs: [publish_binaries]
Expand Down

0 comments on commit df3f4b5

Please sign in to comment.