No description
  • PowerShell 100%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-06 14:49:14 -08:00
action.yml First Commit 2026-11-06 14:49:14 -08:00
README.md First Commit 2026-11-06 14:49:14 -08:00
sign-files.ps1 First Commit 2026-11-06 14:49:14 -08:00

sign-files

A Forgejo Action that Authenticode-signs Windows binaries with scsigntool.exe (SHA256 digest, RFC 3161 timestamp).

Supported extensions: .exe .dll .msi .msp .msm .sys .ocx .cat

Requirements

  • A self-hosted Windows runner (forgejo-runner in host mode) with a label such as windows.
  • The signing token/smart card attached to that machine and scsigntool.exe on PATH (or pass its full path via signtool).
  • PowerShell 7 (pwsh) on the runner.

Usage

Push this repo to your Forgejo instance (e.g. your-org/sign-files) and tag a release (v1). Then in another repo's .forgejo/workflows/build.yml:

jobs:
  build:
    runs-on: windows
    steps:
      - uses: actions/checkout@v4

      # ... build steps that produce ./out ...

      - name: Sign binaries
        id: sign
        uses: https://forgejo.example.com/your-org/sign-files@v1
        with:
          path: out
          recurse: "true"
          thumbprint: ${{ vars.SIGN_THUMBPRINT }}
          description: My Product
          pin: ${{ secrets.SIGN_PIN }}

      - run: echo "Signed ${{ steps.sign.outputs.succeeded }} file(s)"

Use the full https://… URL in uses: unless your instance's DEFAULT_ACTIONS_URL points at your own Forgejo server.

Inputs

Input Required Default Notes
path yes File or directory
thumbprint no (empty → /a) SHA1 cert thumbprint (/sha1)
description no /d value
pin no Always pass from a secret
signtool no scsigntool.exe
timestamp-url no http://timestamp.digicert.com
recurse no false Search subdirectories

Outputs

succeeded and failed — file counts. The step fails if any file fails to sign.

Running locally

.\sign-files.ps1 .\out -Recurse -Thumbprint ABC123... -Pin 1234