Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 15 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
Expand All @@ -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
Expand All @@ -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 }}
Expand All @@ -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
Expand All @@ -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 }}
Expand All @@ -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
Expand All @@ -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 }}
Expand All @@ -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
Expand All @@ -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 }}
Expand All @@ -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 }}
Expand All @@ -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
Expand Down
Loading