Skip to content

Commit

Permalink
Merge pull request #30 from 417-72KI/release/1.3.0
Browse files Browse the repository at this point in the history
Release 1.3.0
  • Loading branch information
417-72KI authored Aug 20, 2021
2 parents 4deeff3 + d25ee3d commit 7a20a1c
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 49 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Release
on:
push:
branches:
- release/*
paths-ignore:
- '*.xcodeproj'
jobs:
prepare:
name: Prepare
runs-on: macos-11
strategy:
matrix:
xcode: [12.5]
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
.build
key: ${{ runner.os }}-xcode${{ matrix.xcode }}-${{ hashFiles('Package.resolved') }}
restore-keys: |
${{ runner.os }}-xcode${{ matrix.xcode }}-
- run: scripts/release.sh
64 changes: 34 additions & 30 deletions MultipartFormDataParser.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -550,13 +550,13 @@
"OBJ_151" = {
isa = "PBXGroup";
children = (
"APIKit::APIKit::Product",
"Alamofire::Alamofire::Product",
"Moya::Moya::Product",
"APIKit::APIKit::Product",
"OHHTTPStubs::OHHTTPStubsSwift::Product",
"OHHTTPStubs::OHHTTPStubs::Product",
"MultipartFormDataParser::MultipartFormDataParser::Product",
"MultipartFormDataParser::MultipartFormDataParserTests::Product",
"MultipartFormDataParser::MultipartFormDataParser::Product"
"OHHTTPStubs::OHHTTPStubs::Product",
"OHHTTPStubs::OHHTTPStubsSwift::Product"
);
name = "Products";
path = "";
Expand Down Expand Up @@ -599,6 +599,7 @@
"OBJ_165" = {
isa = "XCBuildConfiguration";
buildSettings = {
CURRENT_PROJECT_VERSION = "1";
ENABLE_TESTABILITY = "YES";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand Down Expand Up @@ -640,6 +641,7 @@
"OBJ_166" = {
isa = "XCBuildConfiguration";
buildSettings = {
CURRENT_PROJECT_VERSION = "1";
ENABLE_TESTABILITY = "YES";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand Down Expand Up @@ -856,7 +858,7 @@
"-I",
"$(TOOLCHAIN_DIR)/usr/lib/swift/pm/4_2",
"-sdk",
"/Applications/Xcode_12.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk",
"/Applications/Xcode_12.5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk",
"-package-description-version",
"5.0.0"
);
Expand All @@ -874,7 +876,7 @@
"-I",
"$(TOOLCHAIN_DIR)/usr/lib/swift/pm/4_2",
"-sdk",
"/Applications/Xcode_12.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk",
"/Applications/Xcode_12.5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk",
"-package-description-version",
"5.0.0"
);
Expand Down Expand Up @@ -918,6 +920,7 @@
"OBJ_200" = {
isa = "XCBuildConfiguration";
buildSettings = {
CURRENT_PROJECT_VERSION = "1";
ENABLE_TESTABILITY = "YES";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand Down Expand Up @@ -961,6 +964,7 @@
"OBJ_201" = {
isa = "XCBuildConfiguration";
buildSettings = {
CURRENT_PROJECT_VERSION = "1";
ENABLE_TESTABILITY = "YES";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand Down Expand Up @@ -1232,7 +1236,7 @@
"-I",
"$(TOOLCHAIN_DIR)/usr/lib/swift/pm/4_2",
"-sdk",
"/Applications/Xcode_12.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk",
"/Applications/Xcode_12.5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk",
"-package-description-version",
"5.1.0"
);
Expand All @@ -1250,7 +1254,7 @@
"-I",
"$(TOOLCHAIN_DIR)/usr/lib/swift/pm/4_2",
"-sdk",
"/Applications/Xcode_12.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk",
"/Applications/Xcode_12.5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk",
"-package-description-version",
"5.1.0"
);
Expand Down Expand Up @@ -1280,6 +1284,7 @@
"OBJ_247" = {
isa = "XCBuildConfiguration";
buildSettings = {
CURRENT_PROJECT_VERSION = "1";
ENABLE_TESTABILITY = "YES";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand Down Expand Up @@ -1321,6 +1326,7 @@
"OBJ_248" = {
isa = "XCBuildConfiguration";
buildSettings = {
CURRENT_PROJECT_VERSION = "1";
ENABLE_TESTABILITY = "YES";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand Down Expand Up @@ -1527,7 +1533,7 @@
"-I",
"$(TOOLCHAIN_DIR)/usr/lib/swift/pm/4_2",
"-sdk",
"/Applications/Xcode_12.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk",
"/Applications/Xcode_12.5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk",
"-package-description-version",
"5.0.0"
);
Expand All @@ -1545,7 +1551,7 @@
"-I",
"$(TOOLCHAIN_DIR)/usr/lib/swift/pm/4_2",
"-sdk",
"/Applications/Xcode_12.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk",
"/Applications/Xcode_12.5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk",
"-package-description-version",
"5.0.0"
);
Expand Down Expand Up @@ -1580,6 +1586,7 @@
"OBJ_284" = {
isa = "XCBuildConfiguration";
buildSettings = {
CURRENT_PROJECT_VERSION = "1";
ENABLE_TESTABILITY = "YES";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand Down Expand Up @@ -1621,6 +1628,7 @@
"OBJ_285" = {
isa = "XCBuildConfiguration";
buildSettings = {
CURRENT_PROJECT_VERSION = "1";
ENABLE_TESTABILITY = "YES";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand Down Expand Up @@ -1723,7 +1731,7 @@
"-I",
"$(TOOLCHAIN_DIR)/usr/lib/swift/pm/4_2",
"-sdk",
"/Applications/Xcode_12.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk",
"/Applications/Xcode_12.5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk",
"-package-description-version",
"5.1.0"
);
Expand All @@ -1741,7 +1749,7 @@
"-I",
"$(TOOLCHAIN_DIR)/usr/lib/swift/pm/4_2",
"-sdk",
"/Applications/Xcode_12.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk",
"/Applications/Xcode_12.5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk",
"-package-description-version",
"5.1.0"
);
Expand Down Expand Up @@ -1783,14 +1791,9 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = "macosx";
SUPPORTED_PLATFORMS = (
"macosx",
"iphoneos",
"iphonesimulator",
"appletvos",
"appletvsimulator",
"watchos",
"watchsimulator"
"$(AVAILABLE_PLATFORMS)"
);
SUPPORTS_MACCATALYST = "YES";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = (
"$(inherited)",
"SWIFT_PACKAGE",
Expand Down Expand Up @@ -1844,6 +1847,7 @@
isa = "XCBuildConfiguration";
buildSettings = {
CLANG_ENABLE_MODULES = "YES";
CURRENT_PROJECT_VERSION = "1";
EMBEDDED_CONTENT_CONTAINS_SWIFT = "YES";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand Down Expand Up @@ -1879,14 +1883,15 @@
SWIFT_VERSION = "5.0";
TARGET_NAME = "MultipartFormDataParserTests";
TVOS_DEPLOYMENT_TARGET = "11.0";
WATCHOS_DEPLOYMENT_TARGET = "2.0";
WATCHOS_DEPLOYMENT_TARGET = "7.0";
};
name = "Debug";
};
"OBJ_308" = {
isa = "XCBuildConfiguration";
buildSettings = {
CLANG_ENABLE_MODULES = "YES";
CURRENT_PROJECT_VERSION = "1";
EMBEDDED_CONTENT_CONTAINS_SWIFT = "YES";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand Down Expand Up @@ -1922,7 +1927,7 @@
SWIFT_VERSION = "5.0";
TARGET_NAME = "MultipartFormDataParserTests";
TVOS_DEPLOYMENT_TARGET = "11.0";
WATCHOS_DEPLOYMENT_TARGET = "2.0";
WATCHOS_DEPLOYMENT_TARGET = "7.0";
};
name = "Release";
};
Expand Down Expand Up @@ -2086,6 +2091,7 @@
"OBJ_337" = {
isa = "XCBuildConfiguration";
buildSettings = {
CURRENT_PROJECT_VERSION = "1";
DEFINES_MODULE = "NO";
ENABLE_TESTABILITY = "YES";
FRAMEWORK_SEARCH_PATHS = (
Expand Down Expand Up @@ -2128,6 +2134,7 @@
"OBJ_338" = {
isa = "XCBuildConfiguration";
buildSettings = {
CURRENT_PROJECT_VERSION = "1";
DEFINES_MODULE = "NO";
ENABLE_TESTABILITY = "YES";
FRAMEWORK_SEARCH_PATHS = (
Expand Down Expand Up @@ -2264,7 +2271,7 @@
"-I",
"$(TOOLCHAIN_DIR)/usr/lib/swift/pm/4_2",
"-sdk",
"/Applications/Xcode_12.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk",
"/Applications/Xcode_12.5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk",
"-package-description-version",
"5.0.0"
);
Expand All @@ -2282,7 +2289,7 @@
"-I",
"$(TOOLCHAIN_DIR)/usr/lib/swift/pm/4_2",
"-sdk",
"/Applications/Xcode_12.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk",
"/Applications/Xcode_12.5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk",
"-package-description-version",
"5.0.0"
);
Expand Down Expand Up @@ -2312,6 +2319,7 @@
"OBJ_355" = {
isa = "XCBuildConfiguration";
buildSettings = {
CURRENT_PROJECT_VERSION = "1";
ENABLE_TESTABILITY = "YES";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand Down Expand Up @@ -2357,6 +2365,7 @@
"OBJ_356" = {
isa = "XCBuildConfiguration";
buildSettings = {
CURRENT_PROJECT_VERSION = "1";
ENABLE_TESTABILITY = "YES";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand Down Expand Up @@ -2464,14 +2473,9 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = "macosx";
SUPPORTED_PLATFORMS = (
"macosx",
"iphoneos",
"iphonesimulator",
"appletvos",
"appletvsimulator",
"watchos",
"watchsimulator"
"$(AVAILABLE_PLATFORMS)"
);
SUPPORTS_MACCATALYST = "YES";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = (
"$(inherited)",
"SWIFT_PACKAGE"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,6 @@ github "417-72KI/MultipartFormDataParser"

```swift
dependencies: [
.package(url: "https://github.com/417-72KI/MultipartFormDataParser.git", from: "1.2.0")
.package(url: "https://github.com/417-72KI/MultipartFormDataParser.git", from: "1.3.0")
]
```
2 changes: 1 addition & 1 deletion Sources/MultipartFormDataParser/Info.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Foundation

enum Info {
static let version = "1.2.0"
static let version = "1.3.0"
}
29 changes: 12 additions & 17 deletions scripts/release.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
#!/bin/zsh

if ! type "github-release" > /dev/null; then
echo '`github-release` not found. Install'
go get github.com/aktau/github-release
fi

cd $(git rev-parse --show-toplevel)

PACKAGE_NAME='MultipartFormDataParser'

CURRENT_BRANCH=$(git branch | grep '* main')
CURRENT_BRANCH=$(git branch | grep '* release')
if [ "${CURRENT_BRANCH}" = '' ]; then
echo '[Error] this script must be run in main branch.'
echo '[Error] this script must be run in release branch.'
exit 1
fi

Expand All @@ -37,16 +32,16 @@ fi
# Generate xcodeproj
swift package generate-xcodeproj

git add ${PACKAGE_NAME}.xcodeproj
# commit
git config advice.addIgnoredFile false
git config user.name github-actions
git config user.email github-actions@github.com
git add ${PACKAGE_NAME}.xcodeproj/project.pbxproj
git commit -m 'Update xcodeproj'
git push origin

# TAG
git tag ${TAG}
git push origin ${TAG}

# GitHub Release
github-release release \
--user 417-72KI \
--repo ${PACKAGE_NAME} \
--tag ${TAG}
# Draft release
curl -X POST \
-H "Authorization: token ${GITHUB_TOKEN}" \
-d "{\"tag_name\": \"${TAG}\", \"target_commitish\": \"main\", \"name\": \"${TAG}\", \"draft\": true}" \
https://api.github.com/repos/417-72KI/MultipartFormDataParser/releases

0 comments on commit 7a20a1c

Please sign in to comment.