diff --git a/.github/workflows/build-release-all.yml b/.github/workflows/build-release-all.yml
new file mode 100644
index 0000000..47a52e6
--- /dev/null
+++ b/.github/workflows/build-release-all.yml
@@ -0,0 +1,96 @@
+name: 'build All'
+
+on:
+ push:
+ tags:
+ - 'v*'
+
+
+jobs:
+ build-windows:
+ name: Build and release Windows Version
+ uses: ./.github/workflows/build-release-windows.yml
+ with:
+ version: ${{ github.ref }}
+ build-linux:
+ name: Build and release Linux Version
+ uses: ./.github/workflows/build-release-linux.yml
+ with:
+ version: ${{ github.ref }}
+ build-mac:
+ name: Build and release Mac Version
+ uses: ./.github/workflows/build-release-mac.yml
+ with:
+ version: ${{ github.ref }}
+ update-linux-installer:
+ name: Update linux installer file
+ needs:
+ - build-windows
+ - build-linux
+ - build-mac
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Get Version
+ id: get_version
+ uses: battila7/get-version-action@v2.2.1
+ - run: sed -i "s/__VERSION__/${{ steps.get_version.outputs.version}}/g" ./CutCode_linux_x64_installer.sh
+ - name: Upload installer file
+ uses: actions/upload-artifact@v3
+ with:
+ path: ./CutCode_linux_x64_installer.sh
+ create-release:
+ name: Create Release
+ needs:
+ - update-linux-installer
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Get Version
+ id: get_version
+ uses: battila7/get-version-action@v2.2.1
+ - name: Download artifacts
+ uses: actions/download-artifact@v3
+ with:
+ path: ./Artifacts
+ - run: ls -R ./Artifacts
+ - name: linux installer
+ uses: svenstaro/upload-release-action@v2
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ repo_token: ${{ secrets.GITHUB_TOKEN }}
+ file: /home/runner/work/CutCode/CutCode/Artifacts/artifact/CutCode_linux_x64_installer.sh
+ asset_name: CutCode_linux_x64_installer.sh
+ tag: ${{ github.ref }}
+ prerelease: true
+ - name: linux build
+ uses: svenstaro/upload-release-action@v2
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ repo_token: ${{ secrets.GITHUB_TOKEN }}
+ file: /home/runner/work/CutCode/CutCode/Artifacts/LinuxBuild.tar.gz/CutCodeLinux.tar.gz
+ asset_name: LinuxBuild.tar.gz
+ tag: ${{ github.ref }}
+ prerelease: true
+ - name: Mac build
+ uses: svenstaro/upload-release-action@v2
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ repo_token: ${{ secrets.GITHUB_TOKEN }}
+ file: /home/runner/work/CutCode/CutCode/Artifacts/MacBuild.zip/CutCodeMac.zip
+ asset_name: MacBuild.zip
+ tag: ${{ github.ref }}
+ prerelease: true
+ - name: Windows build
+ uses: svenstaro/upload-release-action@v2
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ repo_token: ${{ secrets.GITHUB_TOKEN }}
+ file: /home/runner/work/CutCode/CutCode/Artifacts/WindowsBuild.zip/CutCodeWindows.zip
+ asset_name: WindowsBuild.zip
+ tag: ${{ github.ref }}
+ prerelease: true
\ No newline at end of file
diff --git a/.github/workflows/build-release-linux.yml b/.github/workflows/build-release-linux.yml
new file mode 100644
index 0000000..de12c77
--- /dev/null
+++ b/.github/workflows/build-release-linux.yml
@@ -0,0 +1,34 @@
+name: 'build linux'
+
+on:
+ workflow_call:
+ inputs:
+ version:
+ description: 'The version for the manual flow'
+ required: true
+ type: string
+
+jobs:
+ build_linux:
+ name: Build Linux App
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: setup .Net 6
+ uses: actions/setup-dotnet@v1
+ with:
+ dotnet-version: 6.0.x
+ - name: Build Linux App
+ run: |
+ cd CutCode.CrossPlatform
+ dotnet publish -c Release -f net6.0 -r linux-x64
+ - name: Archive Artifact
+ run: |
+ cd CutCode.CrossPlatform/bin/Release/net6.0/linux-x64
+ tar -czvf CutCodeLinux.tar.gz publish
+ - name: Upload Artifact
+ uses: actions/upload-artifact@v3
+ with:
+ name: LinuxBuild.tar.gz
+ path: ./CutCode.CrossPlatform/bin/Release/net6.0/linux-x64/CutCodeLinux.tar.gz
diff --git a/.github/workflows/build-release-mac.yml b/.github/workflows/build-release-mac.yml
new file mode 100644
index 0000000..e5137bb
--- /dev/null
+++ b/.github/workflows/build-release-mac.yml
@@ -0,0 +1,46 @@
+name: 'build mac'
+
+on:
+ workflow_call:
+ inputs:
+ version:
+ description: 'The version for the manual flow'
+ required: true
+ type: string
+
+
+jobs:
+ build_mac:
+ name: Build Mac App
+ runs-on: macos-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: setup .Net 6
+ uses: actions/setup-dotnet@v1
+ with:
+ dotnet-version: 6.0.x
+ - name: Build Mac App
+ run: |
+ cd CutCode.CrossPlatform
+ dotnet restore -r osx-x64
+ dotnet msbuild -t:BundleApp -p:RuntimeIdentifier=osx-x64 -property:Configuration=Release -p:UseAppHost=true
+ mkdir Assets/logo.iconset
+ sips -z 512 512 Assets/Images/logo.png --out Assets/logo.iconset/icon_512x512.png
+ ls Assets/logo.iconset
+ iconutil --convert icns Assets/logo.iconset
+ ls Assets
+ ls bin/Release/net6.0/osx-x64/publish
+ ls bin/Release/net6.0/osx-x64/publish/CutCode.app
+ ls bin/Release/net6.0/osx-x64/publish/CutCode.app/Contents/Resources
+ cp Assets/logo.icns bin/Release/net6.0/osx-x64/publish/CutCode.app/Contents/Resources/logo.icns
+ rm Assets/logo.icns
+ rm -rf Assets/logo.iconset
+ - name: Archive Artifact
+ run: |
+ cd CutCode.CrossPlatform/bin/Release/net6.0/osx-x64/publish
+ zip -r CutCodeMac.zip CutCode.app
+ - name: Upload Artifact
+ uses: actions/upload-artifact@v3
+ with:
+ name: MacBuild.zip
+ path: ./CutCode.CrossPlatform/bin/Release/net6.0/osx-x64/publish/CutCodeMac.zip
\ No newline at end of file
diff --git a/.github/workflows/build-release-windows.yml b/.github/workflows/build-release-windows.yml
new file mode 100644
index 0000000..375b1d1
--- /dev/null
+++ b/.github/workflows/build-release-windows.yml
@@ -0,0 +1,34 @@
+name: 'build windows'
+
+on:
+ workflow_call:
+ inputs:
+ version:
+ description: 'The version for the manual flow'
+ required: false
+ type: string
+
+jobs:
+ build_windows:
+ name: Build Windows App
+ runs-on: windows-latest
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: setup .Net 6
+ uses: actions/setup-dotnet@v1
+ with:
+ dotnet-version: 6.0.x
+ - name: Build Windows App
+ run: |
+ cd CutCode.CrossPlatform
+ dotnet publish -c Release -f net6.0 -r win7-x64
+ - name: Archive Artifact
+ run: |
+ cd CutCode.CrossPlatform/bin/Release/net6.0/win7-x64
+ powershell Compress-Archive -Path .\publish -DestinationPath CutCodeWindows.zip
+ - name: Upload Artifact
+ uses: actions/upload-artifact@v3
+ with:
+ name: WindowsBuild.zip
+ path: ./CutCode.CrossPlatform/bin/Release/net6.0/win7-x64/CutCodeWindows.zip
diff --git a/CutCode.CrossPlatform/CutCode.CrossPlatform.csproj b/CutCode.CrossPlatform/CutCode.CrossPlatform.csproj
index d81fb5e..0052bfd 100644
--- a/CutCode.CrossPlatform/CutCode.CrossPlatform.csproj
+++ b/CutCode.CrossPlatform/CutCode.CrossPlatform.csproj
@@ -14,6 +14,19 @@
CutCode.CrossPlatform.Program
Assets\Images\logo.ico
+
+ CutCode
+ CutCode
+ com.cutcode
+ 3.0.0
+ 3.0.0
+ AAPL
+ ????
+ CutCode.CrossPlatform
+ /Assets/logo.icns
+ NSApplication
+ true
+
@@ -32,6 +45,7 @@
+
diff --git a/CutCode_linux_x64_installer.sh b/CutCode_linux_x64_installer.sh
new file mode 100644
index 0000000..5793267
--- /dev/null
+++ b/CutCode_linux_x64_installer.sh
@@ -0,0 +1,46 @@
+BASE_URL="https://github.com/Abdesol/CutCode/releases/download/"
+VERSION="__VERSION__"
+FILE="CutCodeLinux.tar.gz"
+FOLDER="CutCode __VERSION__ linux x64"
+
+
+if [ "$EUID" -ne 0 ]
+ then echo "Please run as root"
+ exit
+fi
+
+#Make cutcode tmp file
+rm -rf cutcode-tmp
+mkdir cutcode-tmp
+cd cutcode-tmp
+dialog --infobox "installing CutCode..." 20 60
+#Get built files and unzip them
+curl -LO $BASE_URL/$VERSION/$FILE
+tar -xf $FILE
+
+#make directory to put built files into and put the files
+rm -rf /opt/CutCode/
+mkdir /opt/CutCode/
+cp -r "$FOLDER"/* /opt/CutCode
+
+#make needed file executables
+chmod +x /opt/CutCode/CutCode
+#add file to /usr/bin/ and make it executable
+echo "/opt/CutCode/CutCode" > /usr/bin/CutCode
+chmod +x /usr/bin/CutCode
+#add .desktop file
+cp "$FOLDER"/CutCode.desktop /usr/share/applications/
+
+# Delete the temp file
+cd ..
+rm -rf cutcode-tmp
+
+whiptail --msgbox "CutCode has been installed successfully"
+
+
+
+if whiptail --yesno "Do you want to open CutCode?" 20 60 ;then
+ CutCode
+else
+ whiptail --msgbox "Thanks for installing CutCode, you can either launch it by running CutCode or search for CutCode in your app drawer" 20 60
+fi