Improve release workflow (#326)

This commit is contained in:
Davide De Rosa 2023-07-05 17:07:47 +01:00 committed by GitHub
parent 98e5e4cdde
commit f0e3b2fa9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 35 additions and 70 deletions

View File

@ -120,11 +120,6 @@ jobs:
- name: Publish on TestFlight (macOS) - name: Publish on TestFlight (macOS)
run: | run: |
bundle exec fastlane --env mac,beta run pilot bundle exec fastlane --env mac,beta run pilot
- name: Tag beta
run: |
git config user.name "Passepartout Beta"
git config user.email "beta@passepartoutvpn.app"
git tag -a "v$PILOT_APP_VERSION-b$PILOT_BUILD_NUMBER" -m "Public Beta" && git push --tags
submit_for_app_review: submit_for_app_review:
name: Submit to App Review name: Submit to App Review
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -183,5 +178,6 @@ jobs:
with: with:
tag_name: "v${{ env.TAG_NAME }}" tag_name: "v${{ env.TAG_NAME }}"
body_path: ${{ env.RELEASE_NOTES }} body_path: ${{ env.RELEASE_NOTES }}
draft: true
files: | files: |
${{ env.RELEASE_NOTES }} ${{ env.RELEASE_NOTES }}

View File

@ -8,20 +8,20 @@ GEM
artifactory (3.0.15) artifactory (3.0.15)
atomos (0.1.3) atomos (0.1.3)
aws-eventstream (1.2.0) aws-eventstream (1.2.0)
aws-partitions (1.749.0) aws-partitions (1.783.0)
aws-sdk-core (3.171.0) aws-sdk-core (3.176.1)
aws-eventstream (~> 1, >= 1.0.2) aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.651.0) aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.5) aws-sigv4 (~> 1.5)
jmespath (~> 1, >= 1.6.1) jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.63.0) aws-sdk-kms (1.68.0)
aws-sdk-core (~> 3, >= 3.165.0) aws-sdk-core (~> 3, >= 3.176.0)
aws-sigv4 (~> 1.1) aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.120.1) aws-sdk-s3 (1.127.0)
aws-sdk-core (~> 3, >= 3.165.0) aws-sdk-core (~> 3, >= 3.176.0)
aws-sdk-kms (~> 1) aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.4) aws-sigv4 (~> 1.6)
aws-sigv4 (1.5.2) aws-sigv4 (1.6.0)
aws-eventstream (~> 1, >= 1.0.2) aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4) babosa (1.0.4)
claide (1.1.0) claide (1.1.0)
@ -30,13 +30,13 @@ GEM
commander (4.6.0) commander (4.6.0)
highline (~> 2.0.0) highline (~> 2.0.0)
declarative (0.0.20) declarative (0.0.20)
digest-crc (0.6.4) digest-crc (0.6.5)
rake (>= 12.0.0, < 14.0.0) rake (>= 12.0.0, < 14.0.0)
domain_name (0.5.20190701) domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0) unf (>= 0.0.5, < 1.0.0)
dotenv (2.8.1) dotenv (2.8.1)
emoji_regex (3.2.3) emoji_regex (3.2.3)
excon (0.99.0) excon (0.100.0)
faraday (1.10.3) faraday (1.10.3)
faraday-em_http (~> 1.0) faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0) faraday-em_synchrony (~> 1.0)
@ -65,8 +65,8 @@ GEM
faraday-retry (1.0.3) faraday-retry (1.0.3)
faraday_middleware (1.2.0) faraday_middleware (1.2.0)
faraday (~> 1.0) faraday (~> 1.0)
fastimage (2.2.6) fastimage (2.2.7)
fastlane (2.212.2) fastlane (2.213.0)
CFPropertyList (>= 2.3, < 4.0.0) CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.8, < 3.0.0) addressable (>= 2.8, < 3.0.0)
artifactory (~> 3.0) artifactory (~> 3.0)
@ -90,7 +90,7 @@ GEM
json (< 3.0.0) json (< 3.0.0)
jwt (>= 2.1.0, < 3) jwt (>= 2.1.0, < 3)
mini_magick (>= 4.9.4, < 5.0.0) mini_magick (>= 4.9.4, < 5.0.0)
multipart-post (~> 2.0.0) multipart-post (>= 2.0.0, < 3.0.0)
naturally (~> 2.2) naturally (~> 2.2)
optparse (~> 0.1.1) optparse (~> 0.1.1)
plist (>= 3.1.0, < 4.0.0) plist (>= 3.1.0, < 4.0.0)
@ -106,7 +106,7 @@ GEM
xcpretty (~> 0.3.0) xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3) xcpretty-travis-formatter (>= 0.0.3)
gh_inspector (1.1.3) gh_inspector (1.1.3)
google-apis-androidpublisher_v3 (0.39.0) google-apis-androidpublisher_v3 (0.45.0)
google-apis-core (>= 0.11.0, < 2.a) google-apis-core (>= 0.11.0, < 2.a)
google-apis-core (0.11.0) google-apis-core (0.11.0)
addressable (~> 2.5, >= 2.5.1) addressable (~> 2.5, >= 2.5.1)
@ -137,7 +137,7 @@ GEM
google-cloud-core (~> 1.6) google-cloud-core (~> 1.6)
googleauth (>= 0.16.2, < 2.a) googleauth (>= 0.16.2, < 2.a)
mini_mime (~> 1.0) mini_mime (~> 1.0)
googleauth (1.5.2) googleauth (1.6.0)
faraday (>= 0.17.3, < 3.a) faraday (>= 0.17.3, < 3.a)
jwt (>= 1.4, < 3.0) jwt (>= 1.4, < 3.0)
memoist (~> 0.16) memoist (~> 0.16)
@ -150,12 +150,12 @@ GEM
httpclient (2.8.3) httpclient (2.8.3)
jmespath (1.6.2) jmespath (1.6.2)
json (2.6.3) json (2.6.3)
jwt (2.7.0) jwt (2.7.1)
memoist (0.16.2) memoist (0.16.2)
mini_magick (4.12.0) mini_magick (4.12.0)
mini_mime (1.1.2) mini_mime (1.1.2)
multi_json (1.15.0) multi_json (1.15.0)
multipart-post (2.0.0) multipart-post (2.3.0)
nanaimo (0.3.0) nanaimo (0.3.0)
naturally (2.2.1) naturally (2.2.1)
optparse (0.1.1) optparse (0.1.1)

View File

@ -32,7 +32,7 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>APPL</string> <string>APPL</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>2.1.1</string> <string>2.1.2</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>3468</string> <string>3468</string>
<key>ITSAppUsesNonExemptEncryption</key> <key>ITSAppUsesNonExemptEncryption</key>

View File

@ -3,7 +3,7 @@
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>2.1.1</string> <string>2.1.2</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>3468</string> <string>3468</string>
<key>LSBackgroundOnly</key> <key>LSBackgroundOnly</key>

View File

@ -5,7 +5,7 @@
<key>CFBundleIdentifier</key> <key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>2.1.1</string> <string>2.1.2</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>3468</string> <string>3468</string>
<key>NSPrincipalClass</key> <key>NSPrincipalClass</key>

View File

@ -17,7 +17,7 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>XPC!</string> <string>XPC!</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>2.1.1</string> <string>2.1.2</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>3468</string> <string>3468</string>
<key>LSMinimumSystemVersion</key> <key>LSMinimumSystemVersion</key>

@ -1 +1 @@
Subproject commit 90d6b13efd00f5607ae9cd6e5fdde375bdfabfa5 Subproject commit 27974b18ac9bda4dbc41a7b5fa23db149680b9ab

View File

@ -13,7 +13,7 @@
Passepartout is a user-friendly [OpenVPN®][openvpn] and [WireGuard®][wireguard] client for iOS and macOS. Passepartout is a user-friendly [OpenVPN®][openvpn] and [WireGuard®][wireguard] client for iOS and macOS.
[![Join Reddit](https://img.shields.io/badge/discuss-Reddit-orange.svg)][about-reddit] [![Join Reddit](https://img.shields.io/badge/discuss-Reddit-orange.svg)][about-reddit]
[![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?url=https%3A%2F%2Fpassepartoutvpn.app%2F&via=keeshux&text=Passepartout%20is%20a%20user-friendly%2C%20open%20source%20VPN%20client%20for%20%23iOS%20and%20%23macOS) [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?url=https%3A%2F%2Fpassepartoutvpn.app%2F&via=keeshux&text=Passepartout%20is%20a%20user-friendly%2C%20open-source%20VPN%20client%20for%20%23iOS%20and%20%23macOS)
## Overview ## Overview

View File

@ -10,20 +10,9 @@ if [[ -z $VERSION ]]; then
exit 1 exit 1
fi fi
DATE=`date "+%Y-%m-%d"`
CHANGELOG_GLOB="CHANGELOG.md"
COMMIT_MESSAGE="[ci skip] Set release date"
TAG_MESSAGE="Release" TAG_MESSAGE="Release"
sed -i'' -E "s/^.*Unreleased.*$/## $VERSION ($DATE)/" $CHANGELOG_GLOB
if ! git commit -am "$COMMIT_MESSAGE"; then
echo "Failed to commit release"
git reset --hard
exit 1
fi
if ! git tag -a "v$VERSION" -m "$TAG_MESSAGE"; then if ! git tag -a "v$VERSION" -m "$TAG_MESSAGE"; then
echo "Failed to tag release" echo "Failed to tag release"
git reset --hard HEAD^
exit 1 exit 1
fi fi

View File

@ -6,7 +6,7 @@ if [[ $CURRENT_BRANCH != "master" ]]; then
fi fi
# pull latest API # pull latest API
API_PATH="PassepartoutLibrary/Sources/PassepartoutServices/API" API_PATH="API"
if ! git -C $API_PATH pull origin master; then if ! git -C $API_PATH pull origin master; then
echo "Could not pull API" echo "Could not pull API"
exit 1 exit 1
@ -35,10 +35,17 @@ git add $BASE_BUILD_FILE $BUILD_FILE
git add Passepartout.xcodeproj git add Passepartout.xcodeproj
git add *.plist git add *.plist
# set release date
VERSION=`ci/version-number.sh ios`
DATE=`date "+%Y-%m-%d"`
CHANGELOG_GLOB="CHANGELOG.md"
# either set new or replace existing
sed -i'' -E "s/^.*$VERSION.*$/## $VERSION ($DATE)/" $CHANGELOG_GLOB
sed -i'' -E "s/^.*Unreleased.*$/## $VERSION ($DATE)/" $CHANGELOG_GLOB
# add release notes # add release notes
git add CHANGELOG.md git add CHANGELOG.md
git add Passepartout/App/fastlane/*/metadata/*/release_notes.txt git add Passepartout/App/fastlane/*/metadata/*/release_notes.txt
git commit -m "Attempt beta release" git commit -m "Attempt release"
#VERSION=`ci/version-number.sh ios`
#git tag "v$VERSION-b$BUILD"

View File

@ -1,27 +0,0 @@
#!/bin/bash
VERSION_PREV=$1
if [[ -z $VERSION_PREV ]]; then
echo "Released version number required"
exit 1
fi
RELEASE_BASE=`git merge-base master "v$VERSION_PREV" 2>>/dev/null`
if [[ $? != 0 ]]; then
echo "Version does not exist"
exit 1
fi
COMMITS_COUNT=`git rev-list --count $RELEASE_BASE..v$VERSION_PREV`
if [[ $COMMITS_COUNT == 0 ]]; then
echo "Version is already merged"
exit 1
fi
if ! git checkout -b "merge/v$VERSION_PREV" master; then
echo "Could not create merge branch"
exit 1
fi
if ! git cherry-pick $RELEASE_BASE.."v$VERSION_PREV"; then
echo "Automatic cherry-picking has failed"
exit 1
fi