-
-
Notifications
You must be signed in to change notification settings - Fork 18
42 lines (39 loc) · 1.26 KB
/
spm.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Update Package.resolved
on:
schedule:
- cron: "0 0 * * 1"
workflow_dispatch:
jobs:
run:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: SwiftyLab/setup-swift@latest
- name: Update Package.swift.json
run: |
set -ex
tempdir=$(mktemp -d)
filename="Package.swift"
curl -sfL -o "$tempdir/$filename" https://raw.github.com/swiftfiddle/swiftfiddle-lsp/main/Resources/ProjectTemplate/$filename
swift package --package-path "$tempdir" dump-package > Resources/$filename.json
- name: Build
run: |
set -ex
swift package update
swift build
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GH_PAT }}
base: "master"
commit-message: "Update Swift Packages"
title: "Update Swift Packages"
add-paths: |
Resources/Package.swift.json
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 }}