Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing workflows #45

Merged
merged 2 commits into from
Feb 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions .github/workflows/dotnet-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.402
dotnet-version: 6.0.x
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --no-restore --verbosity normal

publish:
needs: build
if: github.ref == 'refs/heads/master'
Expand All @@ -31,28 +31,36 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.402
dotnet-version: 6.0.x
# Publish osx-x64
- name: Publish osx-x64
run: dotnet publish -r osx-x64 -c Release /p:PublishTrimmed=true
- name: Archive osx-x64
uses: actions/upload-artifact@v1
with:
name: PurpleExplorer_osx-x64
path: PurpleExplorer/bin/Release/netcoreapp3.1/osx-x64/publish
path: PurpleExplorer/bin/Release/net6.0/osx-x64/publish
# Publish osx-arm64
- name: Publish osx-arm64
run: dotnet publish -r osx-arm64 -c Release /p:PublishTrimmed=true
- name: Archive osx-arm64
uses: actions/upload-artifact@v1
with:
name: PurpleExplorer_osx-arm64
path: PurpleExplorer/bin/Release/net6.0/osx-arm64/publish
# Publish win-x64
- name: Publish win-x64
run: dotnet publish -r win-x64 -c Release /p:PublishTrimmed=true
- name: Archive win-x64
uses: actions/upload-artifact@v1
with:
name: PurpleExplorer_win-x64
path: PurpleExplorer/bin/Release/netcoreapp3.1/win-x64/publish
path: PurpleExplorer/bin/Release/net6.0/win-x64/publish
# Publish linux-x64
- name: Publish linux-x64
run: dotnet publish -r linux-x64 -c Release /p:PublishTrimmed=true
- name: Archive linux-x64
uses: actions/upload-artifact@v1
with:
name: PurpleExplorer_linux-x64
path: PurpleExplorer/bin/Release/netcoreapp3.1/linux-x64/publish
path: PurpleExplorer/bin/Release/net6.0/linux-x64/publish
29 changes: 22 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,27 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.402
dotnet-version: 6.0.x
# Publish osx-x64
- name: Publish osx-x64
run: dotnet publish -r osx-x64 -c Release /p:PublishTrimmed=true /p:Version=${{env.releaseVersion}}
- name: Zip osx-x64
run: (cd PurpleExplorer/bin/Release/netcoreapp3.1/osx-x64/publish ; zip -r PurpleExplorer_osx-x64.zip *)
run: (cd PurpleExplorer/bin/Release/net6.0/osx-x64/publish ; zip -r PurpleExplorer_osx-x64.zip *)
# Publish osx-arm64
- name: Publish osx-arm64
run: dotnet publish -r osx-arm64 -c Release /p:PublishTrimmed=true /p:Version=${{env.releaseVersion}}
- name: Zip osx-arm64
run: (cd PurpleExplorer/bin/Release/net6.0/osx-arm64/publish ; zip -r PurpleExplorer_osx-arm64.zip *)
# Publish win-x64
- name: Publish win-x64
run: dotnet publish -r win-x64 -c Release /p:PublishTrimmed=true /p:Version=${{env.releaseVersion}}
- name: Zip win-x64
run: (cd PurpleExplorer/bin/Release/netcoreapp3.1/win-x64/publish ; zip -r PurpleExplorer_win-x64 *)
run: (cd PurpleExplorer/bin/Release/net6.0/win-x64/publish ; zip -r PurpleExplorer_win-x64 *)
# Publish linux-x64
- name: Publish linux-x64
run: dotnet publish -r linux-x64 -c Release /p:PublishTrimmed=true /p:Version=${{env.releaseVersion}}
- name: Zip linux-x64
run: (cd PurpleExplorer/bin/Release/netcoreapp3.1/linux-x64/publish ; zip -r PurpleExplorer_linux-x64 *)
run: (cd PurpleExplorer/bin/Release/net6.0/linux-x64/publish ; zip -r PurpleExplorer_linux-x64 *)
# Create release
- name: Create Release
id: create_release
Expand All @@ -57,17 +62,27 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: PurpleExplorer/bin/Release/netcoreapp3.1/osx-x64/publish/PurpleExplorer_osx-x64.zip
asset_path: PurpleExplorer/bin/Release/net6.0/osx-x64/publish/PurpleExplorer_osx-x64.zip
asset_name: PurpleExplorer_osx-x64.zip
asset_content_type: application/zip
# Upload osx-arm64
- name: Upload osx-arm64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: PurpleExplorer/bin/Release/net6.0/osx-arm64/publish/PurpleExplorer_osx-arm64.zip
asset_name: PurpleExplorer_osx-arm64.zip
asset_content_type: application/zip
# Upload win-x64
- name: Upload win-x64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: PurpleExplorer/bin/Release/netcoreapp3.1/win-x64/publish/PurpleExplorer_win-x64.zip
asset_path: PurpleExplorer/bin/Release/net6.0/win-x64/publish/PurpleExplorer_win-x64.zip
asset_name: PurpleExplorer_win-x64.zip
asset_content_type: application/zip
# Upload linux-x64
Expand All @@ -77,6 +92,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: PurpleExplorer/bin/Release/netcoreapp3.1/linux-x64/publish/PurpleExplorer_linux-x64.zip
asset_path: PurpleExplorer/bin/Release/net6.0/linux-x64/publish/PurpleExplorer_linux-x64.zip
asset_name: PurpleExplorer_linux-x64.zip
asset_content_type: application/zip