Díry #39
Workflow file for this run
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: "Electron" | |
| on: | |
| release: | |
| types: [created] | |
| jobs: | |
| electron-build: | |
| if: github.actor == 'solcloud' | |
| permissions: | |
| contents: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: "Install Linux dependencies" | |
| timeout-minutes: 3 | |
| run: | | |
| sudo apt-get update && sudo apt-get install -y \ | |
| npm zip curl | |
| - name: "Install Node dependencies" | |
| timeout-minutes: 3 | |
| run: | | |
| cd electron/ | |
| npm install | |
| - name: "Build Electron apps" | |
| timeout-minutes: 5 | |
| run: | | |
| cd electron/ | |
| rm -rf build/ | |
| npm run build | |
| mv build/ csf/ | |
| zip -r linux.zip csf/build-linux*/ | |
| zip -r windows.zip csf/build-win*/ | |
| zip -r macos.zip csf/build-mas*/ | |
| rm -rf csf/ | |
| - name: "Publish Linux Artifact" | |
| timeout-minutes: 5 | |
| env: | |
| RELEASE_ID: ${{ github.event.release.id }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| echo "release: $RELEASE_ID" | |
| curl -L \ | |
| -X POST \ | |
| -H "Accept: application/vnd.github+json" \ | |
| -H "Authorization: Bearer ${GITHUB_TOKEN}" \ | |
| -H "X-GitHub-Api-Version: 2022-11-28" \ | |
| -H "Content-Type: application/zip" \ | |
| "https://uploads.github.com/repos/solcloud/Counter-Strike/releases/${RELEASE_ID}/assets?name=csf-client-linux.zip" \ | |
| --data-binary "@electron/linux.zip" | |
| - name: "Publish Windows Artifact" | |
| timeout-minutes: 5 | |
| env: | |
| RELEASE_ID: ${{ github.event.release.id }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| echo "release: $RELEASE_ID" | |
| curl -L \ | |
| -X POST \ | |
| -H "Accept: application/vnd.github+json" \ | |
| -H "Authorization: Bearer ${GITHUB_TOKEN}" \ | |
| -H "X-GitHub-Api-Version: 2022-11-28" \ | |
| -H "Content-Type: application/zip" \ | |
| "https://uploads.github.com/repos/solcloud/Counter-Strike/releases/${RELEASE_ID}/assets?name=csf-client-windows.zip" \ | |
| --data-binary "@electron/windows.zip" | |
| - name: "Publish MacOS Artifact" | |
| timeout-minutes: 5 | |
| env: | |
| RELEASE_ID: ${{ github.event.release.id }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| echo "release: $RELEASE_ID" | |
| curl -L \ | |
| -X POST \ | |
| -H "Accept: application/vnd.github+json" \ | |
| -H "Authorization: Bearer ${GITHUB_TOKEN}" \ | |
| -H "X-GitHub-Api-Version: 2022-11-28" \ | |
| -H "Content-Type: application/zip" \ | |
| "https://uploads.github.com/repos/solcloud/Counter-Strike/releases/${RELEASE_ID}/assets?name=csf-client-macos.zip" \ | |
| --data-binary "@electron/macos.zip" |