Staging #1
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: Staging | |
| on: workflow_dispatch | |
| jobs: | |
| build: | |
| if: github.ref == 'refs/heads/main' | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.ref }} | |
| fetch-depth: 0 | |
| - name: Setup go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.24.0" | |
| - name: Setup go packages | |
| run: go install github.com/tc-hib/go-winres@latest | |
| - name: Setup python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.12" | |
| - name: Setup python packages | |
| run: | | |
| pip install pipx | |
| pipx ensurepath | |
| pipx install commitizen | |
| pipx upgrade commitizen | |
| - name: Build binaries | |
| run: ./scripts/build.win.ps1 | |
| - name: Upload assets | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-compiled-assets | |
| path: | | |
| ./dist/rewst_agent_config.win.exe | |
| - name: Sign binaries | |
| run: ./scripts/ssl_com_sign_binaries.ps1 -username '${{ secrets.SSL_COM_USERNAME }}' -password '${{ secrets.SSL_COM_PASSWORD }}' -credentialId '${{ secrets.SSL_COM_CREDENTIAL_ID }}' -totpSecret '${{ secrets.SSL_COM_OTP }}' -appDistPath "$((Get-Item .).FullName)\dist" | |
| - name: Generate checksums | |
| run: | | |
| Get-FileHash -Path ./dist/signed/rewst_agent_config.win.exe -Algorithm SHA256 | Format-List | Out-File -FilePath ./dist/signed/rewst_agent_config.win.exe.sha256 | |
| - name: Upload assets | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-signed-assets | |
| path: | | |
| ./dist/signed/rewst_agent_config.win.exe | |
| ./dist/signed/rewst_agent_config.win.exe.sha256 | |