Update Gamedata. (#41) #20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [ master, release_ci ] | |
| jobs: | |
| main-ci: | |
| uses: ./.github/workflows/ci.yml | |
| with: | |
| release: true | |
| release: | |
| permissions: write-all | |
| runs-on: ubuntu-latest | |
| needs: [ main-ci ] | |
| env: | |
| PROJECT: 'accelerator' | |
| steps: | |
| - run: sudo apt-get install -y tree | |
| - uses: actions/checkout@v4 | |
| name: Repository checkout | |
| with: | |
| fetch-depth: 0 | |
| path: repository | |
| - name: Download Linux release | |
| uses: actions/download-artifact@v5 | |
| with: | |
| name: accelerator_linux | |
| path: linux | |
| - name: Download Windows release | |
| uses: actions/download-artifact@v5 | |
| with: | |
| name: accelerator_windows | |
| path: windows | |
| - name: Zip release again | |
| run: | | |
| cd repository | |
| read -r PRODUCT_VERSION < ./product.version | |
| REV_COUNT=$(git rev-list --count HEAD) | |
| REV_SHA=$(git rev-parse --short HEAD) | |
| cd .. | |
| WINDOWS_ZIP="${{ env.PROJECT }}-$PRODUCT_VERSION-git$REV_COUNT-$REV_SHA-windows.zip" | |
| LINUX_ZIP="${{ env.PROJECT }}-$PRODUCT_VERSION-git$REV_COUNT-$REV_SHA-linux.zip" | |
| zip -r ${WINDOWS_ZIP} windows | |
| zip -r ${LINUX_ZIP} linux | |
| echo "WINDOWS_ZIP=${WINDOWS_ZIP}" >> $GITHUB_ENV | |
| echo "LINUX_ZIP=${LINUX_ZIP}" >> $GITHUB_ENV | |
| - name: Upload release | |
| shell: bash | |
| run: | | |
| echo "Begin upload for branch (${{ github.ref_name }})" | |
| AUTHORIZATION="$(echo -n 'builds:${{ secrets.UPLOAD_PASSWORD }}' | base64)" | |
| echo "::add-mask::${AUTHORIZATION}" | |
| echo "Uploading ${{ env.WINDOWS_ZIP }}" | |
| HTTP_CODE=$(curl -XPOST -H "Authorization: Basic ${AUTHORIZATION}" -H "Content-Type: application/zip" --output /dev/null --silent --write-out "%{http_code}" --data-binary "@${{ env.WINDOWS_ZIP }}" "https://builds.limetech.io/upload.php?project=${{ env.PROJECT }}&branch=${{ github.ref_name }}&filename=${{ env.WINDOWS_ZIP }}") | |
| if test ${HTTP_CODE} -ne 200; then | |
| echo "Upload failed with HTTP Code: ${HTTP_CODE}" | |
| exit 1 | |
| fi | |
| echo "Uploading ${{ env.LINUX_ZIP }}" | |
| HTTP_CODE=$(curl -XPOST -H "Authorization: Basic ${AUTHORIZATION}" -H "Content-Type: application/zip" --output /dev/null --silent --write-out "%{http_code}" --data-binary "@${{ env.LINUX_ZIP }}" "https://builds.limetech.io/upload.php?project=${{ env.PROJECT }}&branch=${{ github.ref_name }}&filename=${{ env.LINUX_ZIP }}") | |
| if test ${HTTP_CODE} -ne 200; then | |
| echo "Upload failed with HTTP Code: ${HTTP_CODE}" | |
| exit 1 | |
| fi | |
| echo "Upload successful!" |