bloxstrap/.github/workflows/ci-release.yml
dependabot[bot] 357a9d5ecd
Bump signpath/github-action-submit-signing-request from 1.1 to 1.2
Bumps [signpath/github-action-submit-signing-request](https://github.com/signpath/github-action-submit-signing-request) from 1.1 to 1.2.
- [Commits](https://github.com/signpath/github-action-submit-signing-request/compare/v1.1...v1.2)

---
updated-dependencies:
- dependency-name: signpath/github-action-submit-signing-request
  dependency-version: '1.2'
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-29 16:32:59 +00:00

91 lines
2.8 KiB
YAML

name: CI (Release)
on: [push, pull_request]
jobs:
build:
runs-on: windows-latest
outputs:
artifact-id: ${{ steps.upload-artifact.outputs.artifact-id }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build -c Release --no-restore
- name: Publish
run: dotnet publish -p:PublishSingleFile=true -p:CommitHash=${{ github.sha }} -p:CommitRef=${{ github.ref_type }}/${{ github.ref_name }} -r win-x64 -c Release --self-contained false .\Bloxstrap\Bloxstrap.csproj
- name: Upload Artifact
id: upload-artifact
uses: actions/upload-artifact@v4
with:
name: Bloxstrap (Release) (${{ github.sha }})
path: .\Bloxstrap\bin\Release\net6.0-windows\win-x64\publish\*
release:
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Sign and download artifact
uses: signpath/github-action-submit-signing-request@v1.2
with:
api-token: '${{ secrets.SIGNPATH_API_TOKEN }}'
organization-id: '107b3de5-057b-42fc-a985-3546e4261775'
project-slug: 'bloxstrap'
signing-policy-slug: 'release-signing'
artifact-configuration-slug: 'github-ci'
github-artifact-id: '${{ needs.build.outputs.artifact-id }}'
wait-for-completion: true
output-artifact-directory: 'release'
- name: Rename binaries
run: mv release/Bloxstrap.exe Bloxstrap-${{ github.ref_name }}.exe
- name: Create release
uses: softprops/action-gh-release@v2
with:
draft: true
files: Bloxstrap-${{ github.ref_name }}.exe
name: Bloxstrap ${{ github.ref_name }}
release-test:
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/release-test')
steps:
- name: Sign and download artifact
uses: signpath/github-action-submit-signing-request@v1.2
with:
api-token: '${{ secrets.SIGNPATH_API_TOKEN }}'
organization-id: '107b3de5-057b-42fc-a985-3546e4261775'
project-slug: 'bloxstrap'
signing-policy-slug: 'release-signing'
artifact-configuration-slug: 'github-ci'
github-artifact-id: '${{ needs.build.outputs.artifact-id }}'
wait-for-completion: true
output-artifact-directory: 'release'
- name: Rename binaries
run: mv release/Bloxstrap.exe Bloxstrap-${{ github.ref_name }}.exe
- name: Create release
uses: softprops/action-gh-release@v2
with:
draft: true
files: Bloxstrap-${{ github.ref_name }}.exe
name: Bloxstrap ${{ github.ref_name }}