Skip to content

Commit

Permalink
Automatically use correct version number when building release builds…
Browse files Browse the repository at this point in the history
… for custom tags
  • Loading branch information
calda authored and nicklockwood committed Sep 15, 2024
1 parent a3742c4 commit a0e1476
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set Version Number
run: echo "Using version number $GITHUB_REF_NAME" && sed -i '' "s/let swiftFormatVersion = \"[^\"]*\"/let swiftFormatVersion = \"$GITHUB_REF_NAME\"/" Sources/SwiftFormat.swift
- name: Build macOS binary
run: swift build -c release --arch arm64 --arch x86_64
- name: Upload artifacts
Expand All @@ -24,7 +26,9 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build it
- name: Set Version Number
run: echo "Using version number $GITHUB_REF_NAME" && sed -i "s/let swiftFormatVersion = \"[^\"]*\"/let swiftFormatVersion = \"$GITHUB_REF_NAME\"/" Sources/SwiftFormat.swift
- name: Build Linux binary
run: |
swift build --configuration release --static-swift-stdlib --enable-dead-strip
SWIFTFORMAT_BIN_PATH=`swift build --configuration release --show-bin-path`
Expand Down

0 comments on commit a0e1476

Please sign in to comment.