fix release workflow
This commit is contained in:
parent
3fcc5e33a2
commit
97d01abfc6
1 changed files with 15 additions and 14 deletions
29
.github/workflows/release.yml
vendored
29
.github/workflows/release.yml
vendored
|
@ -17,17 +17,14 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
artifact_name: http-server
|
target_file: http-server
|
||||||
asset_name: http-server-$tag-linux-amd64.zip
|
artifact: http-server-${{ github.ref_name }}-linux-amd64
|
||||||
zipcmd: zip -j
|
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
artifact_name: http-server
|
target_file: http-server
|
||||||
asset_name: http-server-$tag-macos-amd64.zip
|
artifact: http-server-${{ github.ref_name }}-macos-amd64
|
||||||
zipcmd: zip -j
|
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
artifact_name: http-server.exe
|
target_file: http-server.exe
|
||||||
asset_name: http-server-$tag-windows.zip
|
artifact: http-server-${{ github.ref_name }}-windows.exe
|
||||||
zipcmd: 7z a -tzip
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: sigstore/cosign-installer@v3.4.0
|
- uses: sigstore/cosign-installer@v3.4.0
|
||||||
|
@ -35,13 +32,17 @@ jobs:
|
||||||
- name: Build project
|
- name: Build project
|
||||||
run: cargo build --release --locked
|
run: cargo build --release --locked
|
||||||
|
|
||||||
- name: make release.zip
|
- name: Prepare artifact
|
||||||
run: ${{ matrix.zipcmd}} ${{ matrix.asset_name }} target/release/${{ matrix.artifact_name }}
|
run: cp target/release/${{ matrix.target_file }} ${{ matrix.artifact }}
|
||||||
|
|
||||||
- name: Sign release.zip
|
- name: Sign artifact
|
||||||
run: cosign sign-blob --yes --output-signature ${{ matrix.asset_name }}.sig --output-certificate ${{ matrix.asset_name }}.cert ${{ matrix.asset_name }}
|
run: |
|
||||||
|
cosign sign-blob --yes \
|
||||||
|
--output-signature ${{ matrix.artifact }}.sig \
|
||||||
|
--output-certificate ${{ matrix.artifact }}.cert \
|
||||||
|
${{ matrix.artifact }}
|
||||||
|
|
||||||
- name: Upload artifacts to release
|
- name: Upload artifacts to github-releases
|
||||||
uses: svenstaro/upload-release-action@v2
|
uses: svenstaro/upload-release-action@v2
|
||||||
with:
|
with:
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
Loading…
Add table
Reference in a new issue