diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml new file mode 100644 index 0000000..00a597c --- /dev/null +++ b/.github/workflows/dotnet.yml @@ -0,0 +1,45 @@ +# This workflow will build a .NET project +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net + +name: .NET + +on: + push: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + environment: Package + steps: + - uses: actions/checkout@v4 + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x + - name: Restore dependencies + run: dotnet restore + - name: Build + run: dotnet build --no-restore + - name: Change CD + run: cd OneDriveRipper + - name: Prepare RPM packaging + run: dotnet tool install --global dotnet-rpm + - name: Prepare DEB packaging + run: dotnet tool install --global dotnet-deb + - name: Install RPM packaging tool + run: dotnet rpm install + - name: Install DEB packagin tool + run: dotnet deb install + - name: Create RPM package + run: cd OneDriveRipper && dotnet rpm -c Release -o dist-release + - name: Create DEB package + run: cd OneDriveRipper && dotnet deb -c Release -o dist-release + - name: Publish packages + uses: TykTechnologies/packagecloud-action@v1 + env: + PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }} + with: + repo: 'thonkdifferent/onedriveripper' + dir: './OneDriveRipper/dist-release/'