+ - name: Assign name for test results artifact
+ run: echo ARTIFACT="$(echo '${{ matrix.os }}' | sed 's|[:/]|_|g')" >>"$GITHUB_ENV"
+
+ - name: Create a non-privileged user
+ run: sh .ci/test/prepare.sh
+
+ - name: Run tests with default settings
+ run: sudo -u build CI=1 sh .ci/test/run.sh default
+
+ - name: Run tests without legacy protocol
+ run: sudo -u build CI=1 sh .ci/test/run.sh nolegacy
+
+ - name: Upload test results
+ uses: actions/upload-artifact@v2
+ with:
+ name: tests_${{ env.ARTIFACT }}
+ path: /tmp/logs/tests.*.tar.gz
+ if: always()
+
+ - name: Build package
+ run: sh .ci/package/build.sh
+ if: github.ref == 'refs/heads/1.1' || startsWith(github.ref, 'refs/tags/release-')
+
+ - name: Upload package
+ uses: actions/upload-artifact@v2
+ with:
+ name: pkg-${{ env.ARTIFACT }}
+ path: |
+ *.deb
+ ~/rpmbuild/RPMS/*/*.rpm
+
+ pkg-publish:
+ if: always() && (github.ref == 'refs/heads/1.1' || startsWith(github.ref, 'refs/tags/release-'))
+ runs-on: ubuntu-latest
+ needs:
+ - linux
+ - windows
+
+ steps:
+ - name: Create artifact directory
+ run: mkdir -p /tmp/artifacts
+
+ - name: Download packages
+ uses: actions/download-artifact@v2
+ with:
+ path: /tmp/artifacts
+
+ - name: Publish packages (dev)
+ uses: marvinpinto/action-automatic-releases@latest
+ with:
+ repo_token: ${{ secrets.GITHUB_TOKEN }}
+ automatic_release_tag: latest
+ title: Development release
+ prerelease: true
+ files: /tmp/artifacts/**/*.(deb|rpm|exe)
+ if: startsWith(github.ref, 'refs/heads/')
+
+ - name: Publish packages (release)