Skip to content

Commit 5970fc9

Browse files
committed
Use mise use spm:apple/swift-openapi-generator instead of mint
1 parent 219f4b9 commit 5970fc9

8 files changed

Lines changed: 11 additions & 137 deletions

File tree

.github/composites/setup/action.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,42 +11,40 @@ inputs:
1111
runs:
1212
using: 'composite'
1313
steps:
14-
- uses: jdx/mise-action@v2
14+
- uses: jdx/mise-action@v4
1515
env:
1616
MISE_DATA_DIR: ${{ runner.temp }}/${{ github.action }}/mise
1717
with:
1818
mise_toml: |
1919
[tools]
2020
swift = "${{ inputs.swift }}"
21+
"spm:apple/swift-openapi-generator" = "latest"
2122
[settings]
2223
experimental = true
2324
24-
- uses: irgaly/setup-mint@v1
25-
with:
26-
mint-executable-directory: $HOME/.mint/bin
27-
2825
- name: "Xcode Cache"
2926
if: contains(inputs.os, 'macos')
3027
uses: irgaly/xcode-cache@v1
3128
with:
32-
key: xcode-cache-deriveddata-${{ github.workflow }}-${{ github.sha }}
33-
restore-keys: xcode-cache-deriveddata-${{ github.workflow }}-
29+
key: xcode-cache-deriveddata-${{ github.sha }}
30+
restore-keys: |
31+
${{ runner.os }}-xcode-cache-deriveddata-
3432
3533
# - name: "Set IgnoreFileSystemDeviceInodeChanges flag"
3634
# if: contains(inputs.os, 'macos')
3735
# shell: bash
3836
# run: defaults write com.apple.dt.XCBuild IgnoreFileSystemDeviceInodeChanges -bool YES
3937

4038
- name: "Swift Package Manager Cache"
41-
uses: actions/cache@v4
39+
uses: actions/cache@v5
4240
with:
4341
path: .build
4442
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
4543
restore-keys: |
4644
${{ runner.os }}-spm-
4745
4846
- name: "Compiling Cache"
49-
uses: actions/cache@v4
47+
uses: actions/cache@v5
5048
with:
5149
path: ~/Library/Caches/org.swift.swiftpm/
5250
key: ${{ runner.os }}-swift-build-${{ github.ref_name }}

.github/dependabot-mintfile/MintfileBuilder.swift

Lines changed: 0 additions & 89 deletions
This file was deleted.

.github/dependabot-mintfile/manifest-Mint/Package.swift

Lines changed: 0 additions & 11 deletions
This file was deleted.

.github/dependabot-mintfile/manifest-swift-openapi-generator/Package.swift

Lines changed: 0 additions & 11 deletions
This file was deleted.

.github/dependabot.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,3 @@ updates:
1414
directory: "/"
1515
schedule:
1616
interval: "weekly"
17-
18-
- package-ecosystem: "swift"
19-
directories:
20-
- "/.github/dependabot-mintfile/**/"
21-
schedule:
22-
interval: "weekly"

.github/workflows/DependabotPulls.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on:
44
pull_request:
55
paths:
66
- 'Submodule/**'
7-
- '.github/dependabot-mintfile/**'
87

98
permissions:
109
contents: write
@@ -41,11 +40,6 @@ jobs:
4140
git config user.name "${GITHUB_ACTOR}"
4241
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
4342
44-
- name: "Update Mintfile"
45-
run: |
46-
swift .github/dependabot-mintfile/MintfileBuilder.swift
47-
make commit file="Mintfile"
48-
4943
- name: "Update Sources"
5044
run: |
5145
make -j 3 install

Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ OPENAPI_PATH := Submodule/github/rest-api-description/descriptions/api.github.
88
FILTERED_NAMES := $(shell swift Scripts/PackageTargetsParser.swift $(OPENAPI_PATH))
99
SOURCE_DIRS := $(addprefix Sources/, $(FILTERED_NAMES))
1010
PACKAGE_PATHS := Package.swift
11-
# Fix: https://github.com/irgaly/setup-mint/pull/25
12-
MINT_BIN := $(HOME)/.mint/bin/mint
1311

1412
# Helper
1513
.SILENT: commit
@@ -21,6 +19,9 @@ commit:
2119
|| true;
2220
touch "$(file)";
2321

22+
swift-openapi-generator:
23+
mise use spm:apple/swift-openapi-generator
24+
2425
# Create sources
2526
%/openapi-generator-config.yml:
2627
@mkdir -p "$(@D)"; \
@@ -30,7 +31,7 @@ commit:
3031
%/Client.swift %/Types.swift: $(OPENAPI_PATH)
3132
@echo "\n\nFolder $(@D) running"
3233
@$(MAKE) "$(@D)/openapi-generator-config.yml"
33-
$(MINT_BIN) run apple/swift-openapi-generator generate \
34+
swift-openapi-generator generate \
3435
"$(OPENAPI_PATH)" \
3536
--config "$(@D)/openapi-generator-config.yml" \
3637
--output-directory "$(@D)";

Mintfile

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)