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 8874c5a
Showing
2 changed files
with
61 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,49 @@ | ||
name: CD | ||
|
||
on: | ||
push: | ||
# tags: | ||
# - "v?[0-9]+.[0-9]+.[0-9]+(-[0-9]?)?" | ||
|
||
jobs: | ||
publish-release: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
env: | ||
tag: v0.26.1-1 | ||
upstream_tag: ${${{ vars.tag }}%%"-"*} | ||
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: Create release notes | ||
env: | ||
changelogs_folder: fastlane/metadata/android/en-US/changelogs | ||
changelog: ${{ github.server_url }}/${{ github.repository }}/blob/${{ env.tag }}/$(find ${{ vars.changelogs_folder }} -name $(ls -vr ${{ vars.changelogs_folder}} | head -1)) | ||
run: | | ||
echo "release_notes=$([[ $tag =~ ^$upstream_tag(-1)?$ ]] && echo "This release merges latest NewPipe \`$upstream_tag\`.\n\nFor the complete list of changes see [CHANGELOG]($changelog).$([[ $tag != $upstream_tag ]] && echo "\n\nIf any changes specific to this fork were also made, they will be listed in the [Fork Changelog](#fork-changelog) below.\n\n### Fork Changelog")" || echo "This release only includes changes specific to this fork. Please view the [Fork Changelog](#fork-changelog) below for details.\n\n### Fork Changelog")" >> "$GITHUB_ENV" | ||
echo "generate_fork_changelog=$([[ $tag != $upstream_tag ]] && echo "true" || echo "false")" >> "$GITHUB_ENV" | ||
- name: Create GitHub Release with APK | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
draft: true | ||
tag: ${{ env.upstream_tag }} | ||
name: TEST | ||
artifacts: app/build/outputs/apk/release/*.apk | ||
body: ${{ env.release_notes }} | ||
# body: "This release merges latest NewPipe `${{ env.upstream_tag }}`.\n\nFor the complete list of changes see [CHANGELOG](${{ env.changelog }})." | ||
generateReleaseNotes: ${{ env.generate_fork_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