Update document lane.

This commit is contained in:
shogo4405
2025-05-04 23:06:58 +09:00
parent fdfa1d023a
commit cc948d4e44
8 changed files with 90 additions and 88 deletions
-20
View File
@@ -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.
-3
View File
@@ -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']
-22
View File
@@ -1,22 +0,0 @@
<!---
Provide a short summary in the Title above. Examples of good PR titles:
* "Feature: add so-and-so models"
* "Fix: deduplicate such-and-such"
-->
## Description & motivation
<!---
Describe your changes, and why you're making them. Is this linked to an open
issue, a Trello card, or another pull request? Link it here.
-->
## 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:
+24
View File
@@ -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 }}
+1 -1
View File
@@ -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'
+27 -7
View File
@@ -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
+37 -34
View File
@@ -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 <<COMMAND
swift package --allow-writing-to-directory ../../docs.haishinkit.com/ generate-documentation --hosting-base-path swift/#{version}\
--output-path ../../docs.haishinkit.com/swift/#{version}\
Dir.chdir('..') do
sh 'git clone git@github.com:HaishinKit/docs.haishinkit.com.git'
if Helper.is_ci?
sh "git config --global user.email 'action@github.com'"
sh "git config --global user.name 'GitHub Action'"
end
sh "rm -rf ./docs.haishinkit.com/swift/#{version}"
sh <<COMMAND
swift package --allow-writing-to-directory ./docs.haishinkit.com/ generate-documentation --hosting-base-path swift/#{version}\
--output-path ./docs.haishinkit.com/swift/#{version}\
--transform-for-static-hosting\
--enable-experimental-combined-documentation
--enable-experimental-combined-documentation
COMMAND
sh "rm -rf ../../docs.haishinkit.com/swift/latest"
sh <<COMMAND
swift package --allow-writing-to-directory ../../docs.haishinkit.com/ generate-documentation --hosting-base-path swift/latest\
--output-path ../../docs.haishinkit.com/swift/latest\
sh 'rm -rf ./docs.haishinkit.com/swift/latest'
sh <<COMMAND
swift package --allow-writing-to-directory ./docs.haishinkit.com/ generate-documentation --hosting-base-path swift/latest\
--output-path ./docs.haishinkit.com/swift/latest\
--transform-for-static-hosting\
--enable-experimental-combined-documentation
--enable-experimental-combined-documentation
COMMAND
end
Dir.chdir('../docs.haishinkit.com') do
sh 'git add .'
sh "git commit -m 'Add HaishinKit.kt #{version}'"
sh 'git push origin main'
end
sh 'rm -rf ../docs'
sh 'rm -rf ../docs.haishinkit.com'
end
+1 -1
View File
@@ -19,7 +19,7 @@ For _fastlane_ installation instructions, see [Installing _fastlane_](https://do
[bundle exec] fastlane review
```
[CI] Review PullRequest.
Review PullRequest.
### document