Update Swift Package #621
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Swift Package | |
on: | |
schedule: | |
- cron: "30 22 * * *" | |
workflow_dispatch: | |
jobs: | |
update: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout to the branch | |
uses: actions/checkout@v4 | |
- name: Install Swift | |
uses: slashmo/[email protected] | |
with: | |
version: 6.0 | |
- name: Update Swift Package | |
run: | | |
set -ex | |
export TOOLCHAINS=swift | |
swift package update --package-path ./ | |
swift package update --package-path Resources/parsers/50800 | |
swift package update --package-path Resources/parsers/50900 | |
swift package update --package-path Resources/parsers/51000 | |
swift package update --package-path Resources/parsers/60000 | |
swift package update --package-path Resources/parsers/trunk | |
- name: Create Pull Request | |
id: cpr | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
token: ${{ secrets.GH_PAT }} | |
base: "master" | |
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 }} |