-
Notifications
You must be signed in to change notification settings - Fork 4
63 lines (61 loc) · 2.56 KB
/
publish-studio-linux.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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/[email protected]
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: 9.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/[email protected]
id: compress
with:
command: c
files: ./
cwd: ./out
outPath: ./out/OneWareStudio-${{ steps.get-oneware-version.outputs.info }}-linux-x64.tgz
- uses: ncipollo/release-action@v1
with:
tag: ${{ steps.get-oneware-version.outputs.info }}
artifacts: "./out/*.tgz"
allowUpdates: true
omitBodyDuringUpdate: True
omitNameDuringUpdate: True
omitPrereleaseDuringUpdate: True
omitDraftDuringUpdate: True
- name: Create VersionInfo x64
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 }}-linux-x64.tgz" > ./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 }}-linux-x64.tgz ./cdn.one-ware.com/onewarestudio/${{ steps.get-oneware-version.outputs.info }}/OneWareStudio-${{ steps.get-oneware-version.outputs.info }}-linux-x64.tgz
put ./out/linux-x64.txt ./cdn.one-ware.com/onewarestudio/linux-x64.txt