Publish Studio Desktop for Linux #78
This file contains hidden or 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: | |
| name: Build | |
| if: ${{ github.event_name == 'workflow_dispatch' || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| arch: [ linux-x64, linux-arm64 ] | |
| outputs: | |
| version: ${{ steps.get-oneware-version.outputs.info }} | |
| 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: 10.0.x | |
| - name: Publish | |
| run: dotnet publish ./studio/OneWare.Studio.Desktop/OneWare.Studio.Desktop.csproj -c Release -r ${{ matrix.arch }} -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 }}-${{ matrix.arch }}.tgz | |
| - name: Create VersionInfo | |
| run: echo "${{ steps.get-oneware-version.outputs.info }}|https://github.com/one-ware/OneWare/releases/download/${{ steps.get-oneware-version.outputs.info }}/OneWareStudio-${{ steps.get-oneware-version.outputs.info }}-${{ matrix.arch }}.tgz" > ./out/${{ matrix.arch }}.txt | |
| - name: Upload Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: linux-artifacts-${{ matrix.arch }} | |
| path: | | |
| ./out/OneWareStudio-${{ steps.get-oneware-version.outputs.info }}-${{ matrix.arch }}.tgz | |
| ./out/${{ matrix.arch }}.txt | |
| deploy: | |
| name: Deploy | |
| runs-on: ubuntu-latest | |
| needs: build | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Download Artifacts (x64) | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: linux-artifacts-linux-x64 | |
| - name: Download Artifacts (arm64) | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: linux-artifacts-linux-arm64 | |
| - name: Create Release | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| tag: ${{ needs.build.outputs.version }} | |
| artifacts: "*.tgz" | |
| allowUpdates: true | |
| omitBodyDuringUpdate: True | |
| omitNameDuringUpdate: True | |
| omitPrereleaseDuringUpdate: True | |
| omitDraftDuringUpdate: True | |
| - name: Upload to CDN using lftp | |
| uses: pontago/lftp-deploy-action@master | |
| with: | |
| protocol: sftp | |
| host: 5017617850.ssh.w2.strato.hosting | |
| username: ${{ secrets.ONEWARE_SFTP_USER }} | |
| password: ${{ secrets.ONEWARE_SFTP_PW }} | |
| script: | | |
| set cmd:fail-exit false | |
| put OneWareStudio-${{ needs.build.outputs.version }}-linux-arm64.tgz -o ./cdn.one-ware.com/onewarestudio/${{ needs.build.outputs.version }}/OneWareStudio-${{ needs.build.outputs.version }}-linux-arm64.tgz | |
| put linux-arm64.txt -o ./cdn.one-ware.com/onewarestudio/linux-arm64.txt | |
| mkdir ./cdn.one-ware.com/onewarestudio/${{ needs.build.outputs.version }} | |
| set cmd:fail-exit true | |
| put OneWareStudio-${{ needs.build.outputs.version }}-linux-x64.tgz -o ./cdn.one-ware.com/onewarestudio/${{ needs.build.outputs.version }}/OneWareStudio-${{ needs.build.outputs.version }}-linux-x64.tgz | |
| put linux-x64.txt -o ./cdn.one-ware.com/onewarestudio/linux-x64.txt |