diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6e3e7462d..2bd5cb797 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,7 +20,7 @@ jobs: with: xcode-version: ${{ matrix.xcode }} - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Build and Test run: | xcodebuild -project SwiftFormat.xcodeproj -scheme "SwiftFormat (Framework)" -sdk macosx clean build test -enableCodeCoverage YES -derivedDataPath Build/ @@ -31,7 +31,7 @@ jobs: cd ../../../../ xcrun llvm-cov export -format="lcov" -instr-profile $pathCoverage Build/Build/Products/Debug/SwiftFormat.framework/SwiftFormat > info.lcov - name: Codecov - uses: codecov/codecov-action@v2 + uses: codecov/codecov-action@v4 with: # the token is optional for a public repo, but including it anyway token: a47579fa-9a2a-4c48-b557-aa725c6b5f92 @@ -52,7 +52,7 @@ jobs: options: --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --security-opt apparmor=unconfined steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Build and Test run: | # Needed to be allowed to run git commands in the tests @@ -74,7 +74,7 @@ jobs: with: tag: ${{ matrix.tag }} branch: ${{ matrix.branch }} - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - run: swift test command-line-tool: @@ -92,7 +92,7 @@ jobs: with: xcode-version: ${{ matrix.xcode }} - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Build Command Line Tool run: xcodebuild -project SwiftFormat.xcodeproj -scheme "SwiftFormat (Command Line Tool)" -sdk macosx clean build @@ -111,7 +111,7 @@ jobs: with: xcode-version: ${{ matrix.xcode }} - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Build Swift Format for Xcode app run: xcodebuild -project SwiftFormat.xcodeproj -scheme "SwiftFormat for Xcode" -sdk macosx clean build @@ -130,7 +130,7 @@ jobs: with: xcode-version: ${{ matrix.xcode }} - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Build Editor Extension run: xcodebuild -project SwiftFormat.xcodeproj -scheme "SwiftFormat (Editor Extension)" -sdk macosx clean build diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index f80545bc7..fb9fe6159 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -21,34 +21,34 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ github.event.inputs.ref }} - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 with: platforms: arm64 - name: Set up Docker Buildx id: buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Log in to the Container registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push Docker image - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v6 with: context: . platforms: linux/amd64, linux/arm64 diff --git a/.github/workflows/linux_build.yml b/.github/workflows/linux_build.yml index f41e89659..8226a256b 100644 --- a/.github/workflows/linux_build.yml +++ b/.github/workflows/linux_build.yml @@ -13,7 +13,7 @@ jobs: name: Build SwiftFormat for Linux runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: ref: ${{ github.event.inputs.ref }} - name: Build it @@ -22,7 +22,7 @@ jobs: SWIFTFORMAT_BIN_PATH=`swift build --configuration release --show-bin-path` mv $SWIFTFORMAT_BIN_PATH/swiftformat "${HOME}/swiftformat_linux" - name: 'Upload Artifact' - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: swiftformat_linux path: ~/swiftformat_linux diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5762011aa..84fb22783 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,7 +8,7 @@ jobs: runs-on: macos-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Build macOS binary run: swift build -c release --arch arm64 --arch x86_64 - name: Upload artifacts @@ -23,7 +23,7 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Build it run: | swift build --configuration release --static-swift-stdlib --enable-dead-strip @@ -42,7 +42,7 @@ jobs: needs: [macos, linux] steps: - name: Checkout the repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - uses: actions/download-artifact@v4 with: path: downloaded_artifacts diff --git a/.github/workflows/windows_release.yml b/.github/workflows/windows_release.yml index 1e0084ac2..349878dcf 100644 --- a/.github/workflows/windows_release.yml +++ b/.github/workflows/windows_release.yml @@ -34,13 +34,13 @@ jobs: tag: ${{ matrix.tag }} branch: ${{ matrix.branch }} - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: ref: ${{ github.event.inputs.revision }} - run: swift build -c release -Xswiftc -gnone - - uses: microsoft/setup-msbuild@v1.3.1 + - uses: microsoft/setup-msbuild@v2.0.0 - run: msbuild -nologo -restore Platforms\Windows\SwiftFormat.wixproj -p:Configuration=Release -p:ProductVersion=${{ github.event.inputs.version }} -p:SWIFTFORMAT_BUILD=${{ github.workspace }}\.build\release -p:OutputPath=${{ github.workspace }}\artifacts -p:RunWixToolsOutOfProc=true @@ -49,14 +49,14 @@ jobs: Echo MSI_PATH=$MSI_PATH | Out-File -FilePath ${env:GITHUB_ENV} -Encoding utf8 -Append - name: 'Upload EXE' - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: swiftformat_windows.exe path: .build/x86_64-unknown-windows-msvc/release/swiftformat.exe retention-days: 5 - name: 'Upload MSI' - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: SwiftFormat.msi path: ${{ env.MSI_PATH }}