Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 1 addition & 2 deletions .github/workflows/release-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ jobs:
draft: true
tag: ${{ steps.extract_tag.outputs.tag }}
artifacts: |
tag_name: ${{ steps.extract_tag.outputs.tag }}
files: "build/clippy-*.tar.xz"
build/clippy-*.tar.xz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5 changes: 2 additions & 3 deletions .github/workflows/release-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,8 @@ jobs:
- name: Upload Windows MSI (all architectures)
uses: ncipollo/release-action@v1
with:
files: |
artifacts: |
build/clippy-windows-*.msi

tag_name: ${{ steps.extract_tag.outputs.tag }}
tag: ${{ steps.extract_tag.outputs.tag }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10 changes: 7 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- main

permissions:
contents: write
contents: write # minimal permission needed for release creation

jobs:
create-release:
Expand All @@ -23,10 +23,11 @@ jobs:
MERGE_TITLE="${{ github.event.pull_request.title }}"
echo "Merge title: $MERGE_TITLE"

# Extract version from merge title
VERSION=$(echo "$MERGE_TITLE" | grep -oE 'v[0-9]+\.[0-9]+\.[0-9]+' | sed 's/^v//')
echo "Extracted version: $VERSION"

# Update Cargo.toml
# Update Cargo.toml files
for TOML_PATH in clippy/Cargo.toml clippy-gui/Cargo.toml clippy-server/Cargo.toml; do
sed -i "s/^version\s*=.*/version = \"$VERSION\"/" "$TOML_PATH"
done
Expand All @@ -42,24 +43,27 @@ jobs:
uses: softprops/action-gh-release@v1
with:
tag_name: "v${{ steps.update_version.outputs.version }}"
name: "${{ github.event.pull_request.name }}"
name: "Release v${{ steps.update_version.outputs.version }}"
body: "${{ github.event.pull_request.body }}"
draft: true
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

call-linux:
needs: create-release
uses: ./.github/workflows/release-linux.yml
secrets: inherit
permissions: write-all

call-win:
needs: create-release
uses: ./.github/workflows/release-win.yml
secrets: inherit
permissions: write-all

call-mac:
needs: create-release
uses: ./.github/workflows/release-mac.yml
secrets: inherit
permissions: write-all
Loading