mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
Split CI action into two
Needed because the code signing action requires knowing the artifact upload ID, which as far as I know, is impossible to obtain under a matrix
This commit is contained in:
parent
8b781c176d
commit
7e59537b17
30
.github/workflows/ci-debug.yml
vendored
Normal file
30
.github/workflows/ci-debug.yml
vendored
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
name: CI (Debug)
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: windows-latest
|
||||||
|
|
||||||
|
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 --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 Debug --self-contained false .\Bloxstrap\Bloxstrap.csproj
|
||||||
|
|
||||||
|
- name: Upload Artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: Bloxstrap (Debug) (${{ github.sha }})
|
||||||
|
path: .\Bloxstrap\bin\Debug\net6.0-windows\win-x64\publish\*
|
@ -1,14 +1,13 @@
|
|||||||
name: CI
|
name: CI (Release)
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
configuration: [Debug, Release]
|
|
||||||
|
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
|
||||||
|
outputs:
|
||||||
|
artifact-id: ${{ steps.upload-artifact.outputs.artifact-id }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
@ -25,15 +24,14 @@ jobs:
|
|||||||
run: dotnet build --no-restore
|
run: dotnet build --no-restore
|
||||||
|
|
||||||
- name: Publish
|
- name: Publish
|
||||||
run: dotnet publish -p:PublishSingleFile=true -p:CommitHash=${{ github.sha }} -p:CommitRef=${{ github.ref_type }}/${{ github.ref_name }} -r win-x64 -c ${{ matrix.configuration }} --self-contained false .\Bloxstrap\Bloxstrap.csproj
|
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
|
- name: Upload Artifact
|
||||||
id: upload-artifact-${{ matrix.configuration }}
|
id: upload-artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: Bloxstrap (${{ matrix.configuration }})
|
name: Bloxstrap (Release) (${{ github.sha }})
|
||||||
path: |
|
path: .\Bloxstrap\bin\Release\net6.0-windows\win-x64\publish\*
|
||||||
.\Bloxstrap\bin\${{ matrix.configuration }}\net6.0-windows\win-x64\publish\*
|
|
||||||
|
|
||||||
release:
|
release:
|
||||||
needs: build
|
needs: build
|
||||||
@ -41,7 +39,7 @@ jobs:
|
|||||||
if: startsWith(github.ref, 'refs/tags/v')
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Sign and download release artifact
|
- name: Sign and download artifact
|
||||||
uses: signpath/github-action-submit-signing-request@v1
|
uses: signpath/github-action-submit-signing-request@v1
|
||||||
with:
|
with:
|
||||||
api-token: '${{ secrets.SIGNPATH_API_TOKEN }}'
|
api-token: '${{ secrets.SIGNPATH_API_TOKEN }}'
|
||||||
@ -49,18 +47,16 @@ jobs:
|
|||||||
project-slug: 'bloxstrap'
|
project-slug: 'bloxstrap'
|
||||||
signing-policy-slug: 'release-signing'
|
signing-policy-slug: 'release-signing'
|
||||||
artifact-configuration-slug: 'github-ci'
|
artifact-configuration-slug: 'github-ci'
|
||||||
github-artifact-id: '${{ steps.upload-artifact-Release.outputs.artifact-id }}'
|
github-artifact-id: '${{ needs.build.outputs.artifact-id }}'
|
||||||
wait-for-completion: true
|
wait-for-completion: true
|
||||||
output-artifact-directory: 'release'
|
output-artifact-directory: 'release'
|
||||||
|
|
||||||
- name: Rename binaries
|
- name: Rename binaries
|
||||||
run: |
|
run: mv release/Bloxstrap.exe Bloxstrap-${{ github.ref_name }}.exe
|
||||||
mv release/Bloxstrap.exe Bloxstrap-${{ github.ref_name }}.exe
|
|
||||||
|
|
||||||
- name: Release
|
- name: Create release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
draft: true
|
draft: true
|
||||||
files: |
|
files: Bloxstrap-${{ github.ref_name }}.exe
|
||||||
Bloxstrap-${{ github.ref_name }}.exe
|
|
||||||
name: Bloxstrap ${{ github.ref_name }}
|
name: Bloxstrap ${{ github.ref_name }}
|
Loading…
Reference in New Issue
Block a user