-
Notifications
You must be signed in to change notification settings - Fork 0
115 lines (92 loc) · 3.47 KB
/
Copy pathrelease.yml
File metadata and controls
115 lines (92 loc) · 3.47 KB
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
103
104
105
106
107
108
109
110
111
112
113
114
115
name: Release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
github-release:
name: Create GitHub Release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Extract version from tag
id: version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
name: "v${{ steps.version.outputs.VERSION }}"
body: |
## SquareScreen Android SDK v${{ steps.version.outputs.VERSION }}
### Installation
Add to your `build.gradle.kts`:
```kotlin
dependencies {
// Core player (required)
implementation("io.squarescreen:squarescreen-player:${{ steps.version.outputs.VERSION }}")
// Jetpack Compose UI components (optional)
implementation("io.squarescreen:squarescreen-ui:${{ steps.version.outputs.VERSION }}")
}
```
See [CHANGELOG.md](CHANGELOG.md) for what's changed in this release.
generate_release_notes: true
publish-github-packages:
name: Publish to GitHub Packages
runs-on: ubuntu-latest
needs: github-release
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
- name: Run tests
run: ./gradlew test --stacktrace
- name: Check public API compatibility
run: ./gradlew apiCheck
- name: Publish to GitHub Packages
run: ./gradlew publishAllPublicationsToGitHubPackagesRepository --no-configuration-cache
env:
ORG_GRADLE_PROJECT_githubPackagesUsername: ${{ github.actor }}
ORG_GRADLE_PROJECT_githubPackagesPassword: ${{ secrets.GITHUB_TOKEN }}
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.SIGNING_KEY_ID }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_KEY_PASSWORD }}
publish-maven-central:
name: Publish to Maven Central
runs-on: ubuntu-latest
needs: github-release
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
- name: Run tests
run: ./gradlew test --stacktrace
- name: Check public API compatibility
run: ./gradlew apiCheck
- name: Publish to Maven Central
run: ./gradlew publishAllPublicationsToMavenCentralRepository --no-configuration-cache
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.SIGNING_KEY_ID }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_KEY_PASSWORD }}