chore: Signs build tool (#2406)
This commit is contained in:
parent
1c6d36c12d
commit
c207c2c19f
1 changed files with 65 additions and 2 deletions
67
.github/workflows/build-tool-release.yml
vendored
67
.github/workflows/build-tool-release.yml
vendored
|
|
@ -59,8 +59,56 @@ jobs:
|
||||||
name: ${{ matrix.artifact }}
|
name: ${{ matrix.artifact }}
|
||||||
path: publish/${{ matrix.artifact }}
|
path: publish/${{ matrix.artifact }}
|
||||||
|
|
||||||
release:
|
sign:
|
||||||
needs: build
|
needs: build
|
||||||
|
if: github.ref == 'refs/heads/main'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: Sign (${{ matrix.artifact }})
|
||||||
|
permissions:
|
||||||
|
actions: read
|
||||||
|
contents: read
|
||||||
|
id-token: write
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- artifact: build-tool-win-x64.exe
|
||||||
|
- artifact: build-tool-win-arm64.exe
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Download unsigned artifact
|
||||||
|
uses: actions/download-artifact@v8
|
||||||
|
with:
|
||||||
|
name: ${{ matrix.artifact }}
|
||||||
|
path: unsigned/
|
||||||
|
|
||||||
|
- name: Upload for signing
|
||||||
|
id: upload-for-signing
|
||||||
|
uses: actions/upload-artifact@v7
|
||||||
|
with:
|
||||||
|
name: ${{ matrix.artifact }}-unsigned
|
||||||
|
path: unsigned/${{ matrix.artifact }}
|
||||||
|
|
||||||
|
- name: Submit signing request
|
||||||
|
id: submit
|
||||||
|
uses: signpath/github-action-submit-signing-request@v2
|
||||||
|
with:
|
||||||
|
api-token: '${{ secrets.SIGNPATH_API_TOKEN }}'
|
||||||
|
organization-id: '${{ secrets.SIGNPATH_ORGANIZATION_ID }}'
|
||||||
|
project-slug: 'modernuo'
|
||||||
|
signing-policy-slug: 'test-signing'
|
||||||
|
artifact-configuration-slug: 'build-tool'
|
||||||
|
github-artifact-id: '${{ steps.upload-for-signing.outputs.artifact-id }}'
|
||||||
|
wait-for-completion: true
|
||||||
|
output-artifact-directory: signed/
|
||||||
|
|
||||||
|
- name: Upload signed artifact
|
||||||
|
uses: actions/upload-artifact@v7
|
||||||
|
with:
|
||||||
|
name: ${{ matrix.artifact }}-signed
|
||||||
|
path: signed/${{ matrix.artifact }}
|
||||||
|
|
||||||
|
release:
|
||||||
|
needs: [build, sign]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.ref == 'refs/heads/main'
|
if: github.ref == 'refs/heads/main'
|
||||||
permissions:
|
permissions:
|
||||||
|
|
@ -74,9 +122,24 @@ jobs:
|
||||||
git tag -f build-tool-latest
|
git tag -f build-tool-latest
|
||||||
git push origin build-tool-latest --force
|
git push origin build-tool-latest --force
|
||||||
|
|
||||||
- name: Download all artifacts
|
- name: Download signed Windows artifacts
|
||||||
uses: actions/download-artifact@v8
|
uses: actions/download-artifact@v8
|
||||||
with:
|
with:
|
||||||
|
pattern: '*-signed'
|
||||||
|
path: artifacts/
|
||||||
|
merge-multiple: true
|
||||||
|
|
||||||
|
- name: Download macOS artifacts
|
||||||
|
uses: actions/download-artifact@v8
|
||||||
|
with:
|
||||||
|
pattern: 'build-tool-osx-*'
|
||||||
|
path: artifacts/
|
||||||
|
merge-multiple: true
|
||||||
|
|
||||||
|
- name: Download Linux artifacts
|
||||||
|
uses: actions/download-artifact@v8
|
||||||
|
with:
|
||||||
|
pattern: 'build-tool-linux-*'
|
||||||
path: artifacts/
|
path: artifacts/
|
||||||
merge-multiple: true
|
merge-multiple: true
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue