.net7.0 -> .net8.0 #32
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: .NET Core Desktop | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: windows-latest | |
env: | |
ROOT: ./src | |
steps: | |
- uses: actions/checkout@v2 | |
- name: 📂 Setup .NET Core | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 7.0.x | |
- name: 📂 Files | |
working-directory: ${{env.ROOT}} | |
run: ls -R | |
- name: 🚀 Building RenderBox | |
working-directory: ${{env.ROOT}}/RenderBox | |
run: dotnet publish -p:PublishProfile=FolderProfile -c Release -o out | |
- uses: actions/upload-artifact@v2 | |
if: github.ref == 'refs/heads/master' | |
with: | |
name: builds | |
path: ${{env.ROOT}}/**/out | |
retention-days: 1 | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build | |
if: github.ref == 'refs/heads/master' | |
env: | |
ROOT: ./src | |
NUGET_AUTH_TOKEN: ${{secrets.token}} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/download-artifact@v2 | |
with: | |
name: builds | |
path: ${{env.ROOT}} | |
- name: 📂 Setup .NET Core | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 8.0.x | |
- name: 📂 Pack RenderBox | |
working-directory: ${{env.ROOT}}/RenderBox/out | |
run: | | |
sudo apt-get update | |
sudo apt-get install zip | |
zip -r -9 ./RenderBox.zip ./* | |
- name: 📂 Files | |
working-directory: ${{env.ROOT}} | |
run: ls -R | |
- name: Get current date | |
id: date | |
run: echo "::set-output name=date::$(date +'%Y-%m-%d')" | |
- name: Create Draft Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ steps.date.outputs.date }} | |
release_name: Shapshot ${{ steps.date.outputs.date }} | |
draft: true | |
prerelease: false | |
- uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./src/RenderBox/out/RenderBox.zip | |
asset_name: RenderBox.zip | |
asset_content_type: application/zip | |
- uses: eregon/publish-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
release_id: ${{ steps.create_release.outputs.id }} | |