💩 Add settings page #1
Workflow file for this run
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: Deploy Fossa | |
on: | |
push: | |
tags: | |
- "*.*.*" | |
env: | |
PROJECT_PATH: "Fossa/Fossa.Client.Desktop.csproj" | |
DOTNET_VERSION: "net7.0-windows" | |
FILE_NAME: "fossa-standalone-${{ github.ref_name }}.zip" | |
# TODO: add a step to create executable/msi for windows | |
jobs: | |
deploy: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: "7.0" | |
- name: Restore NuGet packages | |
run: dotnet restore ${{ env.PROJECT_PATH }} | |
- name: Publish the project | |
run: dotnet publish ${{ env.PROJECT_PATH }} -c Release -r win-x64 --self-contained -p:PublishReadyToRun=true -p:PublishSingleFile=true -p:DeleteExistingFiles=true | |
- name: Zip Files | |
run: | | |
Compress-Archive -Path ${{ github.workspace }}/Fossa.Client.Desktop/bin/Release/${{ env.DOTNET_VERSION }}/win-x64/publish/* -DestinationPath ${{ github.workspace }}/Fossa/${{ env.FILE_NAME }} | |
- name: Deploy Update File | |
id: deploy_artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Fossa-Update | |
path: ${{ github.workspace }}/Fossa/${{ env.FILE_NAME }} | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref_name }} | |
release_name: ${{ github.ref_name }} | |
body_path: changelog.md # TODO: add changelog.md | |
- name: Upload Release Asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ${{ github.workspace }}/Fossa/${{ env.FILE_NAME }} | |
asset_name: ${{ env.FILE_NAME }} | |
asset_content_type: application/zip |