-
Notifications
You must be signed in to change notification settings - Fork 22
102 lines (102 loc) · 3.69 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: Deployment workflow
on:
workflow_dispatch:
inputs:
release_version:
description: 'Semantic version number to release'
required: true
spotify_test_client_token:
description: 'Spotify client redirect token (for client tests before release)'
required: true
spotify_test_redirect_uri:
description: 'Spotify redirect uri'
required: true
env:
SPOTIFY_CLIENT_ID: ${{ secrets.SPOTIFY_CLIENT_ID }}
SPOTIFY_CLIENT_SECRET: ${{ secrets.SPOTIFY_CLIENT_SECRET }}
# TODO temporarily deactivating client tests due to flaky (from spotify responses) tests
#SPOTIFY_TOKEN_STRING: ${{ github.event.inputs.spotify_test_client_token }}
SPOTIFY_REDIRECT_URI: ${{ github.event.inputs.spotify_test_redirect_uri }}
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
ORG_GRADLE_PROJECT_SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
SPOTIFY_API_PUBLISH_VERSION: ${{ github.event.inputs.release_version }}
jobs:
release_android_jvm_linux_js:
runs-on: ubuntu-latest
environment: release
steps:
- name: Check out repo
uses: actions/checkout@v2
- name: Install java 11
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '17'
- name: Install curl
run: sudo apt-get install -y curl libcurl4-openssl-dev
- name: Verify Android
run: ./gradlew testDebugUnitTest
- name: Verify JVM/JS
run: ./gradlew jvmTest
- name: Publish JVM/Linux/Android
run: ./gradlew publishKotlinMultiplatformPublicationToNexusRepository publishJvmPublicationToNexusRepository publishAndroidPublicationToNexusRepository publishLinuxX64PublicationToNexusRepository publishJsPublicationToNexusRepository
- name: Archive test results
uses: actions/upload-artifact@v2
with:
name: code-coverage-report
path: build/reports
if: always()
release_mac:
runs-on: macos-latest
environment: release
needs: release_android_jvm_linux_js
steps:
- name: Check out repo
uses: actions/checkout@v2
- name: Install java 11
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '17'
- name: Publish macOS/iOS
run: ./gradlew publishMacosX64PublicationToNexusRepository publishIosX64PublicationToNexusRepository publishIosArm64PublicationToNexusRepository
release_windows:
runs-on: windows-latest
environment: release
needs: release_android_jvm_linux_js
steps:
- name: Check out repo
uses: actions/checkout@v2
- name: Install java 11
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '17'
- run: choco install curl
- name: Publish windows
run: ./gradlew publishMingwX64PublicationToNexusRepository
release_docs:
runs-on: ubuntu-latest
environment: release
steps:
- name: Check out repo
uses: actions/checkout@v2
- name: Install java 11
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '17'
- name: Build docs
run: ./gradlew dokkaHtml
- name: Push docs to docs repo
uses: cpina/github-action-push-to-another-repository@main
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
with:
source-directory: 'docs'
destination-github-username: 'adamint'
destination-repository-name: 'spotify-web-api-kotlin-docs'
user-email: [email protected]
target-branch: main