diff --git a/.github/DISCUSSION_TEMPLATE/q-a.yml b/.github/DISCUSSION_TEMPLATE/q-a.yml deleted file mode 100644 index be366c0b..00000000 --- a/.github/DISCUSSION_TEMPLATE/q-a.yml +++ /dev/null @@ -1,20 +0,0 @@ -body: - - type: markdown - attributes: - value: | - - Feature requests and documentation requests are better suited for [Idea](https://github.com/shogo4405/HaishinKit.swift/discussions/new?category=idea). - - Frequently asked questions and answers are also here. Please take a look [FAQ](https://github.com/shogo4405/HaishinKit.swift/wiki/Frequently-Asked-Questions-and-Answers). - - type: textarea - id: questions - attributes: - label: Please describe your question - description: "Please describe your question. It would be better if you can attach some logs." - validations: - required: true - - type: markdown - attributes: - value: | - ## Tips for Getting Good Answers - 1. Have you set an icon for your GitHub profile? Is your profile information filled out? - 1. Asking good questions leads to better answers. Refer to the following site for tips on how to ask: https://stackoverflow.com/help/how-to-ask - 1. Do you absolutely need an answer? If you want personal support from the author, you need to become a contributor to HaishinKit. diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index a61a6fed..00000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1,3 +0,0 @@ -# These are supported funding model platforms -github: [shogo4405] -custom: ["https://www.paypal.me/shogo4405"] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index d517a086..00000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,22 +0,0 @@ - - -## Description & motivation - - - -## Type of change -Please delete options that are not relevant. -- [ ] Bug fix (non-breaking change which fixes an issue) -- [ ] New feature (non-breaking change which adds functionality) -- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - -## Screenshots: - diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..ec6c4a18 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,24 @@ +name: Release +on: + push: + tags: + - '*.*.*' +jobs: + build: + runs-on: macos-15 + steps: + - uses: actions/checkout@v4 + - name: Select Xcode version + run: sudo xcode-select -s '/Applications/Xcode_16.2.app' + - name: Setup SSH + run: | + mkdir -p ~/.ssh + echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa + chmod 600 ~/.ssh/id_rsa + ssh-keyscan github.com >> ~/.ssh/known_hosts + - name: bundle exec fastlane document + env: + DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + bundle install + bundle exec fastlane document version:${{ github.ref_name }} diff --git a/Gemfile b/Gemfile index d63bac9b..392aef3e 100644 --- a/Gemfile +++ b/Gemfile @@ -2,6 +2,6 @@ source 'https://rubygems.org' gem 'cocoapods' gem 'fastlane' -gem 'synx' +gem 'rubocop' gem 'danger' gem 'danger-privacymanifest', git: 'https://github.com/shogo4405/danger-privacymanifest' diff --git a/Gemfile.lock b/Gemfile.lock index 42894561..27ff3717 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -31,6 +31,7 @@ GEM httpclient (~> 2.8, >= 2.8.3) json (>= 1.5.1) artifactory (3.0.17) + ast (2.4.3) atomos (0.1.3) aws-eventstream (1.3.2) aws-partitions (1.1089.0) @@ -59,7 +60,6 @@ GEM cork nap open4 (~> 1.3) - clamp (0.6.5) cocoapods (1.16.2) addressable (~> 2.8) claide (>= 1.0.2, < 2.0) @@ -99,7 +99,6 @@ GEM cocoapods-try (1.2.0) colored (1.2) colored2 (3.1.2) - colorize (0.8.1) commander (4.6.0) highline (~> 2.0.0) concurrent-ruby (1.3.5) @@ -266,6 +265,8 @@ GEM rexml (>= 3.3.9) kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) + language_server-protocol (3.17.0.4) + lint_roller (1.1.0) logger (1.7.0) mini_magick (4.13.2) mini_mime (1.1.5) @@ -285,11 +286,19 @@ GEM open4 (1.3.4) optparse (0.6.0) os (1.1.4) + parallel (1.27.0) + parser (3.3.8.0) + ast (~> 2.4.1) + racc plist (3.7.2) + prism (1.4.0) pstore (0.2.0) public_suffix (4.0.7) + racc (1.8.1) + rainbow (3.1.1) rake (13.2.1) rchardet (1.9.0) + regexp_parser (2.10.0) representable (3.2.0) declarative (< 0.1.0) trailblazer-option (>= 0.1.1, < 0.2.0) @@ -297,7 +306,22 @@ GEM retriable (3.1.2) rexml (3.4.1) rouge (3.28.0) + rubocop (1.75.4) + json (~> 2.3) + language_server-protocol (~> 3.17.0.2) + lint_roller (~> 1.1.0) + parallel (~> 1.10) + parser (>= 3.3.0.2) + rainbow (>= 2.2.2, < 4.0) + regexp_parser (>= 2.9.3, < 3.0) + rubocop-ast (>= 1.44.0, < 2.0) + ruby-progressbar (~> 1.7) + unicode-display_width (>= 2.4.0, < 4.0) + rubocop-ast (1.44.1) + parser (>= 3.3.7.2) + prism (~> 1.4) ruby-macho (2.5.1) + ruby-progressbar (1.13.0) ruby2_keywords (0.0.5) rubyzip (2.4.1) sawyer (0.9.2) @@ -313,10 +337,6 @@ GEM simctl (1.6.10) CFPropertyList naturally - synx (0.2.1) - clamp (~> 0.6) - colorize (~> 0.7) - xcodeproj (~> 1.0) sysrandom (1.0.5) terminal-notifier (2.0.0) terminal-table (3.0.2) @@ -353,7 +373,7 @@ DEPENDENCIES danger danger-privacymanifest! fastlane - synx + rubocop BUNDLED WITH 2.2.33 diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 98865858..cdc9c7e3 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -1,27 +1,12 @@ -# This file contains the fastlane.tools configuration -# You can find the documentation at https://docs.fastlane.tools -# -# For a list of all available actions, check out -# -# https://docs.fastlane.tools/actions -# -# For a list of all available plugins, check out -# -# https://docs.fastlane.tools/plugins/available-plugins -# - -# Uncomment the line if you want fastlane to automatically update itself -# update_fastlane - -desc "[CI] Review PullRequest." +desc 'Review PullRequest.' lane :review do spm( - command: "test", - package_path: "HaishinKit", + command: 'test', + package_path: 'HaishinKit' ) spm( - command: "test", - package_path: "SRTHaishinKit", + command: 'test', + package_path: 'SRTHaishinKit' ) begin danger( @@ -29,32 +14,50 @@ lane :review do dangerfile: 'Dangerfile', verbose: true ) - rescue + rescue StandardError end end -desc "Creates documents." +desc 'Creates documents.' lane :document do |options| - if options[:version] == "" - UI.error("Version is a required argument!") + if options[:version] == '' + UI.error('Version is a required argument!') next end version = options[:version] - sh "rm -rf ../../docs.haishinkit.com/swift/#{version}" - sh <