forked from polymorphicshade/NewPipe
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add automated release publishing to CI/CD
- Loading branch information
1 parent
c01d5b0
commit a0222dd
Showing
2 changed files
with
55 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: CD | ||
|
||
on: | ||
pull_request: | ||
push: | ||
# tags: | ||
# - "v?[0-9]+.[0-9]+.[0-9]+(-[0-9]+)?" | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
publish-release: | ||
runs-on: ubuntu-latest | ||
env: | ||
test_ref_name: v0.26.1 | ||
steps: | ||
- name: Checkout code repository | ||
uses: actions/checkout@v4 | ||
- name: Setup Java | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: temurin | ||
java-version: 17 | ||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v2 | ||
- name: Build release APK | ||
run: ./gradlew assembleRelease | ||
- name: Upload APK artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: app-release | ||
path: app/build/outputs/apk/release/*.apk | ||
- name: Get changelog | ||
env: | ||
changelogs_folder: fastlane/metadata/android/en-US/changelogs | ||
run: echo "changelog=${{ github.server_url }}/${{ github.repository }}/blob/$test_ref_name/$(find $changelogs_folder -name $(ls -vr $changelogs_folder | head -1))" >> "$GITHUB_ENV" | ||
- name: Create GitHub Release with APK | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
draft: true | ||
prerelease: true | ||
allowUpdates: true | ||
makeLatest: false | ||
tag: $test_ref_name | ||
name: TESTING AUTOMATED RELEASE PROCESS - NOT INTENDED FOR USE | ||
artifacts: app/build/outputs/apk/release/*.apk | ||
body: "This release merges latest NewPipe `$test_ref_name`.\n\nFor the complete list of changes see [CHANGELOG]($changelog)." |
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