From 0bad42827332ceeb3e052588d151d21b06e3f275 Mon Sep 17 00:00:00 2001 From: xscriptor Date: Sun, 26 Apr 2026 00:01:49 +0200 Subject: [PATCH] update workflow fixing releases publish --- .github/workflows/release.yml | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1bdeece..6ff50f6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,7 +24,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Build run: cargo build --release --locked - name: Package @@ -33,7 +33,7 @@ jobs: tar -C target/release -czf "${asset}" gitnapse echo "ASSET=${asset}" >> "$GITHUB_ENV" - name: Upload artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: name: asset-linux-ubuntu path: ${{ env.ASSET }} @@ -53,7 +53,7 @@ jobs: curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Build run: cargo build --release --locked - name: Package @@ -62,7 +62,7 @@ jobs: tar -C target/release -czf "${asset}" gitnapse echo "ASSET=${asset}" >> "$GITHUB_ENV" - name: Upload artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: name: asset-linux-arch path: ${{ env.ASSET }} @@ -82,7 +82,7 @@ jobs: curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Build run: cargo build --release --locked - name: Package @@ -91,7 +91,7 @@ jobs: tar -C target/release -czf "${asset}" gitnapse echo "ASSET=${asset}" >> "$GITHUB_ENV" - name: Upload artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: name: asset-linux-fedora path: ${{ env.ASSET }} @@ -103,7 +103,7 @@ jobs: runs-on: windows-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Build run: cargo build --release --locked - name: Package @@ -113,7 +113,7 @@ jobs: Compress-Archive -Path "target/release/gitnapse.exe" -DestinationPath $asset -Force "ASSET=$asset" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - name: Upload artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: name: asset-windows path: ${{ env.ASSET }} @@ -125,7 +125,7 @@ jobs: runs-on: macos-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Build run: cargo build --release --locked - name: Package @@ -135,7 +135,7 @@ jobs: tar -C target/release -czf "${asset}" gitnapse echo "ASSET=${asset}" >> "$GITHUB_ENV" - name: Upload artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: name: asset-macos path: ${{ env.ASSET }} @@ -156,14 +156,16 @@ jobs: id-token: write steps: - name: Download build artifacts - uses: actions/download-artifact@v5 + uses: actions/download-artifact@v6 with: pattern: asset-* path: dist merge-multiple: true + - name: Checkout repository metadata + uses: actions/checkout@v6 - name: Generate GitHub App token id: app_token - uses: actions/create-github-app-token@v1 + uses: actions/create-github-app-token@v3 with: app-id: ${{ secrets.RELEASE_GH_APP_ID }} private-key: ${{ secrets.RELEASE_GH_APP_PRIVATE_KEY }} @@ -182,6 +184,7 @@ jobs: - name: Create or update release env: GH_TOKEN: ${{ steps.app_token.outputs.token }} + GH_REPO: ${{ github.repository }} run: | gh release view "${RELEASE_TAG}" >/dev/null 2>&1 || \ gh release create "${RELEASE_TAG}" --title "${RELEASE_TAG}" --generate-notes