|
| 1 | +name: Build tools |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + paths-ignore: |
| 8 | + - 'scripts/**' |
| 9 | + - 'images/**' |
| 10 | + - '**.md' |
| 11 | + |
| 12 | +permissions: |
| 13 | + contents: read |
| 14 | + |
| 15 | +jobs: |
| 16 | + build: |
| 17 | + name: Build Tools |
| 18 | + runs-on: windows-latest |
| 19 | + steps: |
| 20 | + - uses: actions/checkout@v4 |
| 21 | + - name: Setup Ninja |
| 22 | + uses: ashutoshvarma/setup-ninja@master |
| 23 | + with: |
| 24 | + version: 1.10.0 |
| 25 | + |
| 26 | + - name: Run CMake |
| 27 | + working-directory: src |
| 28 | + run: cmake -B build -G Ninja -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER=gcc -DCMAKE_BUILD_TYPE=Release |
| 29 | + |
| 30 | + - name: Build |
| 31 | + working-directory: src |
| 32 | + run: cmake --build build |
| 33 | + |
| 34 | + - name: Create hashes.reth |
| 35 | + working-directory: src |
| 36 | + shell: cmd |
| 37 | + run: dir && "build/RETH.exe" "RETH/filenames.txt" "" "build/hashes.reth" |
| 38 | + |
| 39 | + - name: Upload files |
| 40 | + uses: actions/upload-artifact@v4 |
| 41 | + with: |
| 42 | + name: RenderEclipseTools |
| 43 | + path: | |
| 44 | + ./src/build/CAM.exe |
| 45 | + ./src/build/hashes.reth |
| 46 | + ./src/build/dataSplitter.exe |
| 47 | + ./src/build/RETH.exe |
| 48 | + ./src/build/Str-Hash-Test.exe |
| 49 | + |
| 50 | + push: |
| 51 | + needs: build |
| 52 | + if: github.repository == 'IWILLCRAFT-M0d/RenderEclipse-Tools' |
| 53 | + name: Prepare Release |
| 54 | + runs-on: windows-latest |
| 55 | + steps: |
| 56 | + - name: Download artifacts |
| 57 | + uses: actions/download-artifact@v4 |
| 58 | + with: |
| 59 | + name: RenderEclipseTools |
| 60 | + path: ./RenderEclipseTools |
| 61 | + |
| 62 | + - name: Create release |
| 63 | + id: create_release |
| 64 | + uses: actions/create-release@v1 |
| 65 | + env: |
| 66 | + GITHUB_TOKEN: ${{ secrets.DEJAMEENTRAR }} |
| 67 | + with: |
| 68 | + tag_name: test-release |
| 69 | + release_name: RenderEclipseTools |
| 70 | + draft: true |
| 71 | + prerelease: false |
| 72 | + |
| 73 | + - name: Compress back |
| 74 | + run: Compress-Archive -Path ".\RenderEclipseTools" -DestinationPath ".\RenderEclipseTools.zip" |
| 75 | + shell: powershell |
| 76 | + |
| 77 | + - name: Push release executables |
| 78 | + uses: actions/upload-release-asset@v1 |
| 79 | + env: |
| 80 | + GITHUB_TOKEN: ${{ secrets.DEJAMEENTRAR }} |
| 81 | + with: |
| 82 | + upload_url: ${{ steps.create_release.outputs.upload_url }} |
| 83 | + asset_path: RenderEclipseTools.zip |
| 84 | + asset_name: RenderEclipseTools.zip |
| 85 | + asset_content_type: application/zip |
0 commit comments