diff --git a/.github/workflows/draft.yml b/.github/workflows/draft.yml deleted file mode 100644 index 7d2821973d..0000000000 --- a/.github/workflows/draft.yml +++ /dev/null @@ -1,150 +0,0 @@ -on: - push: - tags: - - 'x*' - -name: Create release and build artifacts - -jobs: - build_win: - name: Build Windows artifacts - runs-on: windows-latest - steps: - - name: Checkout code - uses: actions/checkout@master - - name: Checkout deps - run: git clone https://github.com/xmrig/xmrig-deps.git - - name: Build project on Windows - run: | - cmake . -G "Visual Studio 16 2019" -DXMRIG_DEPS=xmrig-deps\msvc2019\x64 - cd "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin" - .\MSBuild.exe /p:Configuration=Release $Env:GITHUB_WORKSPACE\xmrig.sln - cd $Env:GITHUB_WORKSPACE - copy Release\xmrig.exe . - copy src\config.json . - copy bin\WinRing0\WinRing0x64.sys . - 7z a -tzip -mx windows_build.zip xmrig.exe config.json WinRing0x64.sys - - name: Upload Windows build artifacts - uses: actions/upload-artifact@v1 - with: - name: windows_build - path: windows_build.zip - - build_lin: - name: Build Ubuntu artifacts - runs-on: ubuntu-latest - steps: - - name: Prepare Ubuntu tools - run: | - sudo apt-get install -y git build-essential cmake libuv1-dev libssl-dev libhwloc-dev - - name: Checkout code - uses: actions/checkout@master - - name: Build project on Ubuntu - run: | - cmake . - make -j$(nproc) - cp src/config.json . - tar cfz ubuntu_build.tar.gz xmrig config.json - - name: Upload Ubuntu build artifacts - uses: actions/upload-artifact@v1 - with: - name: ubuntu_build - path: ubuntu_build.tar.gz - - build_lin_rh6: - name: Build CentOS 6 artifacts - runs-on: ubuntu-latest - container: centos:6 - steps: - - name: Prepare CentOS 6 tools - run: | - yum install -y git cmake openssl-devel libmicrohttpd-devel centos-release-scl-rh - yum install -y --nogpgcheck devtoolset-6-gcc devtoolset-6-binutils devtoolset-6-gcc-c++ - rpm -i https://github.com/sipcapture/captagent/raw/master/dependency/centos/6/libuv-1.8.0-1.el6.x86_64.rpm - rpm -i https://github.com/sipcapture/captagent/raw/master/dependency/centos/6/libuv-devel-1.8.0-1.el6.x86_64.rpm - - name: Checkout code - run: | - git clone https://github.com/MoneroOcean/xmrig.git . - git checkout ${GITHUB_REF:10} - - name: Build project on CentOS 6 - run: | - scl enable devtoolset-6 "cmake . -DWITH_TLS=OFF -DWITH_HWLOC=OFF" - scl enable devtoolset-6 "make -j$(nproc)" - cp src/config.json . - mv xmrig-notls xmrig - tar cfz centos6_build.tar.gz xmrig config.json - - name: Upload CentOS 6 build artifacts - uses: actions/upload-artifact@v1 - with: - name: centos6_build - path: centos6_build.tar.gz - - deploy: - needs: [build_win, build_lin, build_lin_rh6] - name: Create release and upload artifacts - runs-on: ubuntu-latest - steps: - - name: Create Release - id: create_release - uses: actions/create-release@v1.0.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} - draft: false - prerelease: false - - name: Set version - id: version - run: echo ::set-output name=VERSION::${GITHUB_REF:10} - - name: Download Windows build artifacts - uses: actions/download-artifact@v1 - with: - name: windows_build - - name: Download Ubuntu build artifacts - uses: actions/download-artifact@v1 - with: - name: ubuntu_build - - name: Download CentOS 6 build artifacts - uses: actions/download-artifact@v1 - with: - name: centos6_build - - name: Upload Windows build release asset - uses: actions/upload-release-asset@v1.0.1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: windows_build/windows_build.zip - asset_name: xmrig-${{steps.version.outputs.VERSION}}-win64.zip - asset_content_type: application/zip - - name: Upload Ubuntu build release asset - uses: actions/upload-release-asset@v1.0.1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ubuntu_build/ubuntu_build.tar.gz - asset_name: xmrig-${{steps.version.outputs.VERSION}}-lin64.tar.gz - asset_content_type: application/zip - - name: Upload CentOS 6 build release asset - uses: actions/upload-release-asset@v1.0.1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: centos6_build/centos6_build.tar.gz - asset_name: xmrig-${{steps.version.outputs.VERSION}}-lin64-compat.tar.gz - asset_content_type: application/zip - - name: Update xmrig_setup repo - run: | - git clone https://$GITHUB_ACTOR:${{secrets.xmrig_setup_key}}@github.com/MoneroOcean/xmrig_setup.git - cd xmrig_setup - git config user.name MoneroOcean - git config user.email support@moneroocean.stream - mv ../centos6_build/centos6_build.tar.gz xmrig.tar.gz - mv ../windows_build/windows_build.zip xmrig.zip - unzip xmrig.zip - zip -u offline_miner_setup.zip xmrig.exe config.json WinRing0x64.sys - git commit -m "xmrig "${GITHUB_REF:10}" based release" xmrig.tar.gz xmrig.zip offline_miner_setup.zip - git push