-
Notifications
You must be signed in to change notification settings - Fork 329
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
55 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version_number: | ||
description: 'Version Number' | ||
required: true | ||
default: 'v2.988' | ||
type: string | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: gradle/actions/wrapper-validation@v3 | ||
|
||
- name: set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: 17 | ||
distribution: "adopt" | ||
|
||
- name: Cache Gradle packages | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.gradle/caches | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | ||
restore-keys: ${{ runner.os }}-gradle | ||
|
||
- name: Setup Keystore | ||
id: setup_keystore | ||
uses: timheuer/[email protected] | ||
with: | ||
fileName: 'release.keystore' | ||
encodedString: ${{ secrets.SIGNING_KEY }} | ||
|
||
- name: sha256sum | ||
run: sha256sum ${{steps.setup_keystore.outputs.filePath}} | ||
|
||
- name: Build with Gradle | ||
run: ./gradlew assembleRelease -Pandroid.injected.signing.store.file=${{steps.setup_keystore.outputs.filePath}} -Pandroid.injected.signing.store.password=${{secrets.KEY_STORE_PASSWORD}} -Pandroid.injected.signing.key.alias=${{secrets.ALIAS}} -Pandroid.injected.signing.key.password=${{secrets.KEY_PASSWORD}} | ||
|
||
- name: Create Github Release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
artifacts: "app/build/outputs/apk/oss/release/SkyTube-Oss-*.apk,app/build/outputs/apk/extra/release/SkyTube-Extra-*.apk" | ||
draft: "true" | ||
name: "Version ${{ inputs.version_number }}" | ||
tag: ${{ inputs.version_number}} |