Publish Studio Desktop for Linux #7
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: Publish Studio Desktop for Linux | |
on: | |
workflow_dispatch: | |
workflow_run: | |
workflows: [ Publish Studio Desktop ] | |
types: | |
- completed | |
jobs: | |
# Build Tar GZ and upload | |
deploy-linux: | |
name: Deploy for Linux | |
runs-on: ubuntu-latest | |
if: ${{ github.event_name == 'workflow_dispatch' || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') }} | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: mavrosxristoforos/get-xml-info@2.0 | |
name: Get Version | |
id: get-oneware-version | |
with: | |
xml-file: './build/props/Base.props' | |
xpath: "//*[local-name()='Project']/*[local-name()='PropertyGroup']/*[local-name()='StudioVersion']" | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Publish | |
run: dotnet publish ./studio/OneWare.Studio.Desktop/OneWare.Studio.Desktop.csproj -c Release -r linux-x64 -o ./out | |
- name: Compress | |
uses: a7ul/tar-action@v1.1.0 | |
id: compress | |
with: | |
command: c | |
files: ./ | |
cwd: ./out | |
outPath: ./out/OneWareStudio-${{ steps.get-oneware-version.outputs.info }}-x64.tar.gz | |
- uses: ncipollo/release-action@v1 | |
with: | |
tag: ${{ steps.get-oneware-version.outputs.info }} | |
artifacts: "./out/*.tar.gz" | |
allowUpdates: true | |
omitBodyDuringUpdate: True | |
omitNameDuringUpdate: True | |
omitPrereleaseDuringUpdate: True | |
omitDraftDuringUpdate: True | |
- name: Create VersionInfo x64 | |
run: echo "${{ steps.get-oneware-version.outputs.info }}|https://cdn.one-ware.com/onewarestudio/${{ steps.get-oneware-version.outputs.info }}/OneWareStudio-${{ steps.get-oneware-version.outputs.info }}-x64.tar.gz" > ./out/linux-x64.txt | |
- uses: joutvhu/ftp-transfer@v1 | |
name: Upload | |
with: | |
host: w01ec151.kasserver.com | |
username: w01ec151 | |
password: ${{ secrets.ONEWARE_FTP }} | |
commands: | | |
mkdir ./cdn.one-ware.com/onewarestudio/${{ steps.get-oneware-version.outputs.info }} | |
put ./out/OneWareStudio-${{ steps.get-oneware-version.outputs.info }}-x64.tar.gz ./cdn.one-ware.com/onewarestudio/${{ steps.get-oneware-version.outputs.info }}/OneWareStudio-${{ steps.get-oneware-version.outputs.info }}-x64.tar.gz | |
put ./out/linux-x64.txt ./cdn.one-ware.com/onewarestudio/linux-x64.txt |