Skip to content

Update Swift Package #630

Update Swift Package

Update Swift Package #630

Workflow file for this run

name: Update Swift Package
on:
schedule:
- cron: "30 22 * * *"
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout to the branch
uses: actions/checkout@v4
- name: Swift Version
id: swift-version
run: echo "SWIFT_VERSION=$(cat .swift-version)" >> "$GITHUB_OUTPUT"
- name: Install Swift
uses: slashmo/[email protected]
with:
version: ${{ steps.swift-version.outputs.SWIFT_VERSION }}
- name: Update Swift Package
run: |
set -ex
export TOOLCHAINS=swift
swift package update --package-path ./
swift package update --package-path Examples/SwiftPackage/
swift package update --package-path Playground/
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GH_PAT }}
base: "main"
commit-message: "Update Swift Packages"
title: "Update Swift Packages"
add-paths: |
Package.resolved
**/Package.resolved
- name: Enable Pull Request Automerge
if: ${{ steps.cpr.outputs.pull-request-url }}
run: gh pr merge --merge --auto ${{ steps.cpr.outputs.pull-request-url }}
env:
GH_TOKEN: ${{ secrets.GH_PAT }}