From 97d01abfc6237add3ba508106a659770a87fd965 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B0=D0=BC=D1=98=D0=B0=D0=BD=20=D0=93=D0=B5=D0=BE?= =?UTF-8?q?=D1=80=D0=B3=D0=B8=D0=B5=D0=B2=D1=81=D0=BA=D0=B8?= Date: Sat, 30 Mar 2024 23:59:59 +0100 Subject: [PATCH] fix release workflow --- .github/workflows/release.yml | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3c41ab8..d1c7f15 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,17 +17,14 @@ jobs: matrix: include: - os: ubuntu-latest - artifact_name: http-server - asset_name: http-server-$tag-linux-amd64.zip - zipcmd: zip -j + target_file: http-server + artifact: http-server-${{ github.ref_name }}-linux-amd64 - os: macos-latest - artifact_name: http-server - asset_name: http-server-$tag-macos-amd64.zip - zipcmd: zip -j + target_file: http-server + artifact: http-server-${{ github.ref_name }}-macos-amd64 - os: windows-latest - artifact_name: http-server.exe - asset_name: http-server-$tag-windows.zip - zipcmd: 7z a -tzip + target_file: http-server.exe + artifact: http-server-${{ github.ref_name }}-windows.exe steps: - uses: actions/checkout@v4 - uses: sigstore/cosign-installer@v3.4.0 @@ -35,13 +32,17 @@ jobs: - name: Build project run: cargo build --release --locked - - name: make release.zip - run: ${{ matrix.zipcmd}} ${{ matrix.asset_name }} target/release/${{ matrix.artifact_name }} + - name: Prepare artifact + run: cp target/release/${{ matrix.target_file }} ${{ matrix.artifact }} - - name: Sign release.zip - run: cosign sign-blob --yes --output-signature ${{ matrix.asset_name }}.sig --output-certificate ${{ matrix.asset_name }}.cert ${{ matrix.asset_name }} + - name: Sign artifact + 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 with: repo_token: ${{ secrets.GITHUB_TOKEN }}