Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [push]

jobs:
test:
runs-on: macos-12
runs-on: macos-14
env:
MINT_PATH: "~/mint_cache"

Expand Down
14 changes: 10 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
# Change Log
All notable changes to this project will be documented in this file.

## [Unreleased]
#### 1.x Releases
- `1.2.x` Releases - [1.2.0](#120)
- `1.1.x` Releases - [1.1.0](#110) | [1.1.1](#111)
- `1.0.x` Releases - [1.0.0](#100)

## [1.2.0](https://github.com/space-code/package-template/releases/tag/1.2.0)
Released on 2025-04-20

## Added
- Add the `Dependapot` action
Expand All @@ -27,9 +33,9 @@ All notable changes to this project will be documented in this file.
- Update the `post_get_project` script
- Updated in Pull Request [#14](https://github.com/space-code/package-template/pull/14).

#### 1.x Releases
- `1.1.x` Releases - [1.1.0](#110) | [1.1.1](#111)
- `1.0.x` Releases - [1.0.0](#100)
## Fixed
- Fix the replacement of Cookiecutter parameters.
- Fixed in Pull Request [#19](https://github.com/space-code/package-template/pull/19).

## [1.1.1](https://github.com/space-code/package-template/releases/tag/1.1.1)
Released on 2023-12-18
Expand Down
189 changes: 109 additions & 80 deletions {{ cookiecutter.name | lower }}/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,82 +17,92 @@ jobs:
SwiftLint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: GitHub Action for SwiftLint
uses: norio-nomura/action-swiftlint@3.2.1
with:
args: --strict
env:
{% raw %}
{%- raw %}
DIFF_BASE: ${{ github.base_ref }}
{% endraw %}
{%- endraw %}

{% if cookiecutter.macOS == "Yes" %}
{%- if cookiecutter.macOS == "Yes" %}
macOS:
{% raw %}
{%- raw %}
name: ${{ matrix.name }}
runs-on: ${{ matrix.runsOn }}
{% endraw %}
{%- endraw %}
env:
{% raw %}
{%- raw %}
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer"
{% endraw %}
{%- endraw %}
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
include:
- xcode: "Xcode_16.1"
runsOn: macOS-14
name: "macOS 14, Xcode 16.1, Swift 6.0.2"
- xcode: "Xcode_15.4"
runsOn: macOS-14
name: "macOS 14, Xcode 15.4, Swift 5.10"
- xcode: "Xcode_15.0"
runsOn: macos-13
- xcode: "Xcode_15.0"
runsOn: macos-13
name: "macOS 13, Xcode 15.0, Swift 5.9.0"
- xcode: "Xcode_14.3.1"
runsOn: macos-13
name: "macOS 13, Xcode 14.3.1, Swift 5.8.0"
- xcode: "Xcode_14.2"
runsOn: macOS-12
name: "macOS 12, Xcode 14.2, Swift 5.7.2"
- xcode: "Xcode_14.1"
runsOn: macOS-12
name: "macOS 12, Xcode 14.1, Swift 5.7.1"
steps:
- uses: actions/checkout@v3
{% raw %}
- uses: actions/checkout@v4
{%- raw %}
- name: ${{ matrix.name }}
run: xcodebuild test -scheme "{{ cookiecutter.name }}" -destination "platform=macOS" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
{% endraw %}
{%- endraw %}
run: xcodebuild test -scheme "{{ cookiecutter.name }}" -destination "platform=macOS" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ '{{ matrix.name }}' }}.xcresult" || exit 1
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3.1.0
with:
{% raw %}
{%- raw %}
token: ${{ secrets.CODECOV_TOKEN }}
{% endraw %}
{%- endraw %}
xcode: true
{% raw %}
{%- raw %}
xcode_archive_path: test_output/${{ matrix.name }}.xcresult
{% endraw %}
{%- endraw %}
- uses: actions/upload-artifact@v4
with:
{% raw %}
{%- raw %}
name: ${{ matrix.name }}
{% endraw %}
{%- endraw %}
path: test_output
{% endif %}
{%- endif %}

{% if cookiecutter.ios == "Yes" %}
{%- if cookiecutter.ios == "Yes" %}
iOS:
{% raw %}
{%- raw %}
name: ${{ matrix.name }}
runs-on: ${{ matrix.runsOn }}
{% endraw %}
{%- endraw %}
env:
{% raw %}
{%- raw %}
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer"
{% endraw %}
{%- endraw %}
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
include:
- destination: "OS=18.1,name=iPhone 16 Pro"
name: "iOS 18.1"
xcode: "Xcode_16.1"
runsOn: macOS-14
- destination: "OS=17.5,name=iPhone 15 Pro"
name: "iOS 17.5"
xcode: "Xcode_15.4"
runsOn: macOS-14
- destination: "OS=17.0.1,name=iPhone 14 Pro"
name: "iOS 17.0.1"
xcode: "Xcode_15.0"
Expand All @@ -102,34 +112,42 @@ jobs:
xcode: "Xcode_14.3.1"
runsOn: macos-13
steps:
- uses: actions/checkout@v3
{% raw %}
- uses: actions/checkout@v4
{%- raw %}
- name: ${{ matrix.name }}
run: xcodebuild test -scheme "{{ cookiecutter.name }}" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
{% endraw %}
{%- endraw %}
run: xcodebuild test -scheme "{{ cookiecutter.name }}" -destination "${{ '{{ matrix.destination }}' }}" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ '{{ matrix.name }}' }}.xcresult" || exit 1
- uses: actions/upload-artifact@v4
with:
{% raw %}
{%- raw %}
name: ${{ matrix.name }}
path: test_output
{% endraw %}
{% endif %}
{%- endraw %}
{%- endif %}

{% if cookiecutter.tvOS == "Yes" %}
{%- if cookiecutter.tvOS == "Yes" %}
tvOS:
{% raw %}
{%- raw %}
name: ${{ matrix.name }}
runs-on: ${{ matrix.runsOn }}
{% endraw %}
{%- endraw %}
env:
{% raw %}
{%- raw %}
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer"
{% endraw %}
{%- endraw %}
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
include:
- destination: "OS=18.1,name=Apple TV"
name: "tvOS 18.1"
xcode: "Xcode_16.1"
runsOn: macOS-14
- destination: "OS=17.5,name=Apple TV"
name: "tvOS 17.5"
xcode: "Xcode_15.4"
runsOn: macOS-14
- destination: "OS=17.0,name=Apple TV"
name: "tvOS 17.0"
xcode: "Xcode_15.0"
Expand All @@ -139,44 +157,52 @@ jobs:
xcode: "Xcode_14.3.1"
runsOn: macos-13
steps:
- uses: actions/checkout@v3
{% raw %}
- uses: actions/checkout@v4
{%- raw %}
- name: ${{ matrix.name }}
run: xcodebuild test -scheme "{{ cookiecutter.name }}" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
{% endraw %}
{%- endraw %}
run: xcodebuild test -scheme "{{ cookiecutter.name }}" -destination ${{ '{{ matrix.destination }}' }} clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ '{{ matrix.name }}' }}.xcresult" || exit 1
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3.1.0
with:
{% raw %}
{%- raw %}
token: ${{ secrets.CODECOV_TOKEN }}
{% endraw %}
{%- endraw %}
xcode: true
{% raw %}
{%- raw %}
xcode_archive_path: test_output/${{ matrix.name }}.xcresult
{% endraw %}
{%- endraw %}
- uses: actions/upload-artifact@v4
with:
{% raw %}
{%- raw %}
name: ${{ matrix.name }}
{% endraw %}
{%- endraw %}
path: test_output
{% endif %}
{%- endif %}

{% if cookiecutter.watchOS == "Yes" %}
{%- if cookiecutter.watchOS == "Yes" %}
watchOS:
{% raw %}
{%- raw %}
name: ${{ matrix.name }}
runs-on: ${{ matrix.runsOn }}
{% endraw %}
{%- endraw %}
env:
{% raw %}
{%- raw %}
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer"
{% endraw %}
{%- endraw %}
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
include:
- destination: "OS=11.1,name=Apple Watch Series 10 (46mm)"
name: "watchOS 11.1"
xcode: "Xcode_16.1"
runsOn: macOS-14
- destination: "OS=10.5,name=Apple Watch Series 9 (45mm)"
name: "watchOS 10.5"
xcode: "Xcode_15.4"
runsOn: macOS-14
- destination: "OS=10.0,name=Apple Watch Series 9 (45mm)"
name: "watchOS 10.0"
xcode: "Xcode_15.0"
Expand All @@ -190,55 +216,58 @@ jobs:
xcode: "Xcode_14.3.1"
runsOn: macos-13
steps:
- uses: actions/checkout@v3
{% raw %}
- uses: actions/checkout@v4
{%- raw %}
- name: ${{ matrix.name }}
run: xcodebuild test -scheme "{{ cookiecutter.name }}" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
{% endraw %}
{%- endraw %}
run: xcodebuild test -scheme "{{ cookiecutter.name }}" -destination "${{ '{{ matrix.destination }}' }}" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ '{{ matrix.name }}' }}.xcresult" || exit 1
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3.1.0
with:
{% raw %}
{%- raw %}
token: ${{ secrets.CODECOV_TOKEN }}
{% endraw %}
{%- endraw %}
xcode: true
{% raw %}
{%- raw %}
xcode_archive_path: test_output/${{ matrix.name }}.xcresult
{% endraw %}
{%- endraw %}
- uses: actions/upload-artifact@v4
with:
{% raw %}
{%- raw %}
name: ${{ matrix.name }}
{% endraw %}
{%- endraw %}
path: test_output
{% endif %}
{%- endif %}

spm:
{% raw %}
{%- raw %}
name: ${{ matrix.name }}
runs-on: ${{ matrix.runsOn }}
{% endraw %}
{%- endraw %}
env:
{% raw %}
{%- raw %}
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer"
{% endraw %}
{%- endraw %}
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
include:
- name: "Xcode 15"
- name: "macOS 14, SPM 6.0.2 Test"
xcode: "Xcode_16.1"
runsOn: macOS-14
- name: "macOS 14, SPM 5.9.0 Test"
xcode: "Xcode_15.0"
runsOn: macos-13
- name: "Xcode 14"
runsOn: macos-14
- name: "macOS 13, SPM 5.8.1 Test"
xcode: "Xcode_14.3.1"
runsOn: macos-13
steps:
- uses: actions/checkout@v3
{% raw %}
{%- raw %}
- name: ${{ matrix.name }}
{%- endraw %}
run: swift build -c release --target "{{ cookiecutter.name }}"
{% endraw %}
merge-test-reports:
needs: [iOS, macOS, watchOS, tvOS]
runs-on: macos-13
Expand All @@ -256,11 +285,11 @@ jobs:

discover-typos:
name: Discover Typos
runs-on: macOS-12
runs-on: macOS-13
env:
DEVELOPER_DIR: /Applications/Xcode_14.1.app/Contents/Developer
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Discover typos
run: |
export PATH="$PATH:/Library/Frameworks/Python.framework/Versions/3.11/bin"
Expand Down
4 changes: 2 additions & 2 deletions {{ cookiecutter.name | lower }}/.github/workflows/danger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
bundle install --clean --path vendor/bundle
- name: danger
env:
{% raw %}
{%- raw %}
DANGER_GITHUB_API_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }}
{% endraw %}
{%- endraw %}
run: bundle exec danger --verbose
2 changes: 1 addition & 1 deletion {{ cookiecutter.name | lower }}/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ bootstrap: hook
mint bootstrap

hook:
ln -sf .git/hooks/pre-commit ../../hooks/pre-commit
ln -sf ../../hooks/pre-commit .git/hooks/pre-commitg
chmod +x .git/hooks/pre-commit

mint:
Expand Down
Loading