Skip to content

Commit e83317a

Browse files
authored
Merge pull request #17018 from wordpress-mobile/tooling/create-gh-release-on-ci
[Tooling/CI] Automate creation of GitHub Release after beta/release builds
2 parents a2f7d18 + d64236b commit e83317a

5 files changed

Lines changed: 115 additions & 47 deletions

File tree

.buildkite/beta-builds.yml

Lines changed: 46 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,52 @@ common_params:
88
- automattic/bash-cache#2.1.0
99

1010
steps:
11+
#################
12+
# Lint
13+
#################
14+
- group: "🕵️ Lint"
15+
steps:
1116

12-
- label: "🕵️ Lint WordPress"
13-
command: ".buildkite/commands/lint.sh wordpress"
14-
key: wplint
15-
artifact_paths:
16-
- "**/build/reports/lint-results*.*"
17-
18-
- label: "🕵️ Lint Jetpack"
19-
command: ".buildkite/commands/lint.sh jetpack"
20-
key: jplint
21-
artifact_paths:
22-
- "**/build/reports/lint-results*.*"
23-
24-
- label: "🛠 WordPress Beta Build"
25-
command: ".buildkite/commands/beta-build.sh wordpress"
26-
depends_on: wplint
27-
plugins: *common_plugins
28-
notify:
29-
- slack: "#build-and-ship"
17+
- label: "🕵️ Lint WordPress"
18+
key: wplint
19+
command: ".buildkite/commands/lint.sh wordpress"
20+
artifact_paths:
21+
- "**/build/reports/lint-results*.*"
22+
23+
- label: "🕵️ Lint Jetpack"
24+
key: jplint
25+
command: ".buildkite/commands/lint.sh jetpack"
26+
artifact_paths:
27+
- "**/build/reports/lint-results*.*"
28+
29+
#################
30+
# Beta Builds
31+
#################
32+
- group: "🚀 Beta Builds"
33+
steps:
34+
35+
- label: "🛠 WordPress Beta Build"
36+
key: wpbuild
37+
command: ".buildkite/commands/beta-build.sh wordpress"
38+
depends_on: wplint
39+
plugins: *common_plugins
40+
notify:
41+
- slack: "#build-and-ship"
42+
43+
- label: "🛠 Jetpack Beta Build"
44+
key: jpbuild
45+
command: ".buildkite/commands/beta-build.sh jetpack"
46+
depends_on: jplint
47+
plugins: *common_plugins
48+
notify:
49+
- slack: "#build-and-ship"
3050

31-
- label: "🛠 Jetpack Beta Build"
32-
command: ".buildkite/commands/beta-build.sh jetpack"
33-
depends_on: jplint
51+
#################
52+
# GitHub Release
53+
#################
54+
- label: ":github: Release"
55+
depends_on:
56+
- wpbuild
57+
- jpbuild
58+
command: ".buildkite/commands/create-github-release.sh"
3459
plugins: *common_plugins
35-
notify:
36-
- slack: "#build-and-ship"

.buildkite/commands/beta-build.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,9 @@ bundle exec fastlane run configure_apply
88

99
echo "--- :hammer_and_wrench: Building"
1010
bundle exec fastlane build_beta app:$1 skip_confirm:true skip_prechecks:true upload_to_play_store:true
11+
12+
echo "--- 💾 Saving Artifact"
13+
for aab in build/*.aab; do
14+
buildkite-agent artifact upload "$aab"
15+
echo "<a href="artifact://$aab">$(basename "$aab")</a>" | buildkite-agent annotate --style info --context "beta-build-$aab"
16+
done
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash -eu
2+
3+
echo "--- :rubygems: Setting up Gems"
4+
install_gems
5+
6+
echo "--- ⬇️ Downloading AAB Artefacts"
7+
mkdir -p build/
8+
buildkite-agent artifact download "*.aab" build/
9+
10+
echo "--- :github: Create GitHub Release"
11+
bundle exec fastlane create_gh_release

.buildkite/commands/release-build.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,9 @@ bundle exec fastlane run configure_apply
88

99
echo "--- :hammer_and_wrench: Building"
1010
bundle exec fastlane build_and_upload_release app:$1 skip_confirm:true skip_prechecks:true upload_to_play_store:true
11+
12+
echo "--- 💾 Saving Artifact"
13+
for aab in build/*.aab; do
14+
buildkite-agent artifact upload "$aab"
15+
echo "<a href="artifact://$aab">$(basename "$aab")</a>" | buildkite-agent annotate --style info --context "release-build-$aab"
16+
done

.buildkite/release-builds.yml

Lines changed: 46 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,52 @@ common_params:
88
- automattic/bash-cache#2.1.0
99

1010
steps:
11+
#################
12+
# Lint
13+
#################
14+
- group: "🕵️ Lint"
15+
steps:
1116

12-
- label: "🕵️ Lint WordPress"
13-
command: ".buildkite/commands/lint.sh wordpress"
14-
key: wplint
15-
artifact_paths:
16-
- "**/build/reports/lint-results*.*"
17-
18-
- label: "🕵️ Lint Jetpack"
19-
command: ".buildkite/commands/lint.sh jetpack"
20-
key: jplint
21-
artifact_paths:
22-
- "**/build/reports/lint-results*.*"
23-
24-
- label: "🛠 WordPress Release Build"
25-
command: ".buildkite/commands/release-build.sh wordpress"
26-
depends_on: wplint
27-
plugins: *common_plugins
28-
notify:
29-
- slack: "#build-and-ship"
17+
- label: "🕵️ Lint WordPress"
18+
key: wplint
19+
command: ".buildkite/commands/lint.sh wordpress"
20+
artifact_paths:
21+
- "**/build/reports/lint-results*.*"
3022

31-
- label: "🛠 Jetpack Release Build"
32-
command: ".buildkite/commands/release-build.sh jetpack"
33-
depends_on: jplint
34-
plugins: *common_plugins
35-
notify:
36-
- slack: "#build-and-ship"
23+
- label: "🕵️ Lint Jetpack"
24+
key: jplint
25+
command: ".buildkite/commands/lint.sh jetpack"
26+
artifact_paths:
27+
- "**/build/reports/lint-results*.*"
28+
29+
#################
30+
# Beta Builds
31+
#################
32+
- group: "🚀 Beta Builds"
33+
steps:
3734

35+
- label: "🛠 WordPress Release Build"
36+
key: wpbuild
37+
command: ".buildkite/commands/release-build.sh wordpress"
38+
depends_on: wplint
39+
plugins: *common_plugins
40+
notify:
41+
- slack: "#build-and-ship"
42+
43+
- label: "🛠 Jetpack Release Build"
44+
key: j pbuild
45+
command: ".buildkite/commands/release-build.sh jetpack"
46+
depends_on: jplint
47+
plugins: *common_plugins
48+
notify:
49+
- slack: "#build-and-ship"
50+
51+
#################
52+
# GitHub Release
53+
#################
54+
- label: ":github: Release"
55+
depends_on:
56+
- wpbuild
57+
- jpbuild
58+
command: ".buildkite/commands/create-github-release.sh"
59+
plugins: *common_plugins

0 commit comments

Comments
 (0)