name: CI on: push: branches: [ master ] pull_request: branches: [ master ] workflow_dispatch: jobs: build: name: Build and Test runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Web run: ./bin/build --web-only - name: Dotnet run: ./bin/build --dotnet-only - name: Upload Static Web Content uses: actions/upload-artifact@v2 with: name: web path: src/slskd/wwwroot publish: name: Publish Build Artifacts runs-on: ubuntu-latest needs: build if: github.ref == 'refs/heads/master' strategy: matrix: runtime: ["win-x64", "linux-x64", "linux-musl-x64", "linux-arm64", "osx-x64"] steps: - uses: actions/checkout@v2 - uses: actions/download-artifact@v2 with: name: web path: src/slskd/wwwroot - name: Publish ${{ matrix.runtime }} run: bin/publish --no-prebuild --runtime ${{ matrix.runtime }} --version-suffix $(echo $GITHUB_SHA | cut -c1-7) - name: Upload a Build Artifact uses: actions/upload-artifact@v2 with: name: ${{ matrix.runtime }} path: dist/${{ matrix.runtime }} docker: name: Build Docker Image runs-on: ubuntu-latest needs: build if: github.ref == 'refs/heads/master' steps: - uses: actions/checkout@v2 - name: Build run: docker build -t slskd/slskd:$(echo $GITHUB_SHA | cut -c1-7) .