Skip to content

fix: add postback description #9

fix: add postback description

fix: add postback description #9

Workflow file for this run

name: Build
on:
push:
branches:
- qa
- staging
pull_request:
branches:
- main
types:
- closed
jobs:
build:
permissions:
contents: write
runs-on: windows-latest
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.merged == true)
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: Bump version and push
if: github.ref == 'refs/heads/main'
run: |
git config --local user.email "automated_builds@rewst.io"
git config --local user.name "Rewst GitHub Actions"
cz bump --yes
git push
git push --tags
- 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
if: (github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/main')
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
if: (github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/main')
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
if: (github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/main')
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
- name: Extract version
if: github.ref == 'refs/heads/main'
shell: bash
id: extract_version
run: echo "version=v$(cz version -p)" >> $GITHUB_OUTPUT
- name: Create release and upload files
if: github.ref == 'refs/heads/main'
run: |
gh release create ${{ env.VERSION }} --generate-notes (Get-Item ./dist/signed/*)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ steps.extract_version.outputs.version }}