Skip to content

Commit

Permalink
Add multiplatform publishing (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
tuxuser committed Sep 11, 2020
1 parent 1b5ef7a commit 5737d20
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,24 @@ jobs:
run: dotnet test --no-restore --verbosity normal /p:AssemblyVersion=${{ steps.gitversion.outputs.assemblySemFileVer }} /p:FileVersion=${{ steps.gitversion.outputs.assemblySemFileVer }} /p:InformationalVersion=${{ steps.gitversion.outputs.SemVer }}-${{ steps.gitversion.outputs.ShortSha }}
- name: Create publishable builds
run: dotnet publish --no-restore --configuration Release /p:AssemblyVersion=${{ steps.gitversion.outputs.assemblySemFileVer }} /p:FileVersion=${{ steps.gitversion.outputs.assemblySemFileVer }} /p:InformationalVersion=${{ steps.gitversion.outputs.SemVer }}-${{ steps.gitversion.outputs.ShortSha }}
- name: Create publishable multi platform builds
shell: bash
run: |
for rid in linux-x64 win-x64 win-x86 osx-x64
do
release_name="XVDTool-${{ steps.gitversion.outputs.assemblySemVer }}-${rid}"
output_dir="release-${rid}"
for proj in XVDTool XBFSTool DurangoKeyExtractor
do
dotnet publish --configuration Release ${proj}/${proj}.csproj /p:PublishSingleFile=true /p:AssemblyVersion=${{ steps.gitversion.outputs.assemblySemFileVer }} /p:FileVersion=${{ steps.gitversion.outputs.assemblySemFileVer }} /p:InformationalVersion=${{ steps.gitversion.outputs.SemVer }}-${{ steps.gitversion.outputs.ShortSha }} --self-contained false --framework netcoreapp3.1 --runtime "${rid}" -o "${output_dir}"
done
# Pack files
7z a -tzip "${release_name}.zip" "./${output_dir}/*" ./README.md ./xvd_info.md ./CHANGELOG.md
# Delete output directory
rm -r "$output_dir"
done
- name: Copy files
run: |
mkdir ./release
Expand Down Expand Up @@ -100,3 +118,10 @@ jobs:
asset_path: ./XVDTool-${{ steps.gitversion.outputs.assemblySemVer }}.zip
asset_name: XVDTool-${{ steps.gitversion.outputs.assemblySemVer }}.zip
asset_content_type: application/zip
- name: Publish
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: softprops/action-gh-release@v1
with:
files: "XVDTool-*.zip"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 5737d20

Please sign in to comment.