Skip to content

Commit

Permalink
Update GitHub actions workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsvanvelzen committed Sep 25, 2022
1 parent 5012a12 commit a4fbb20
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 45 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/app-build.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: App Build
name: App / Build

on:
push:
Expand All @@ -11,22 +11,26 @@ permissions:

jobs:
build:
runs-on: ubuntu-20.04
name: Build
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
- name: Setup Java
uses: actions/setup-java@d854b6da19cdadd9a010605529e522c2393ebd38 # tag=v3
with:
distribution: adopt
java-version: 11
cache: gradle
distribution: temurin
java-version: 17
- name: Setup Gradle
uses: gradle/gradle-build-action@c295a4096e1d2c453eaf1f65c6f96686e26bd8be # tag=v2
- name: Assemble debug APKs
run: ./gradlew --build-cache --no-daemon --info assembleDebug
run: ./gradlew assembleDebug
- name: Create publish bundle
run: mkdir -p build/gh-app-publish/; find app/build/ -iname "*.apk" -exec mv "{}" build/gh-app-publish/ \;
- name: Upload artifacts
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # tag=v3
with:
name: build-artifacts
retention-days: 14
if-no-files-found: error
path: app/build/outputs/apk/debug/*.apk
path: build/gh-app-publish/
20 changes: 10 additions & 10 deletions .github/workflows/app-lint.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: App Lint
name: App / Lint

on:
push:
Expand All @@ -9,24 +9,24 @@ on:

permissions:
contents: read
security-events: write

jobs:
lint:
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
runs-on: ubuntu-20.04
name: Lint
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
- name: Setup Java
uses: actions/setup-java@d854b6da19cdadd9a010605529e522c2393ebd38 # tag=v3
with:
distribution: adopt
java-version: 11
cache: gradle
- name: Run detekt and lint task
run: ./gradlew --build-cache --no-daemon --info detekt lint
distribution: temurin
java-version: 17
- name: Setup Gradle
uses: gradle/gradle-build-action@c295a4096e1d2c453eaf1f65c6f96686e26bd8be # tag=v2
- name: Run detekt and lint tasks
run: ./gradlew detekt lint
- name: Upload SARIF files
uses: github/codeql-action/upload-sarif@86f3159a697a097a813ad9bfa0002412d97690a4 # tag=v2
if: ${{ always() }}
Expand Down
19 changes: 11 additions & 8 deletions .github/workflows/app-publish.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
name: App Publish
name: App / Publish

on:
push:
tags:
- v*

jobs:
build:
runs-on: ubuntu-20.04
if: ${{ github.repository == 'jellyfin/jellyfin-androidtv' }}
publish:
name: Publish
runs-on: ubuntu-22.04
if: ${{ contains(github.repository_owner, 'jellyfin') }}
steps:
- name: Checkout repository
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
- name: Setup Java
uses: actions/setup-java@d854b6da19cdadd9a010605529e522c2393ebd38 # tag=v3
with:
distribution: adopt
java-version: 11
distribution: temurin
java-version: 17
- name: Setup Gradle
uses: gradle/gradle-build-action@c295a4096e1d2c453eaf1f65c6f96686e26bd8be # tag=v2
- name: Set JELLYFIN_VERSION
run: echo "JELLYFIN_VERSION=$(echo ${GITHUB_REF#refs/tags/v} | tr / -)" >> $GITHUB_ENV
- name: Assemble release files
run: ./gradlew --no-daemon --info assemble bundleRelease versionTxt
run: ./gradlew assemble bundleRelease versionTxt
- name: Sign APK
id: signApk
uses: r0adkll/sign-android-release@349ebdef58775b1e0d8099458af0816dc79b6407 # tag=v1
Expand All @@ -30,7 +33,7 @@ jobs:
keyStorePassword: ${{ secrets.KEYSTORE_PASSWORD }}
alias: ${{ secrets.KEY_ALIAS }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
- name: Sign AAB
- name: Sign app bundle
id: signAab
uses: r0adkll/sign-android-release@349ebdef58775b1e0d8099458af0816dc79b6407 # tag=v1
with:
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/app-test.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: App Test
name: App / Test

on:
push:
Expand All @@ -12,15 +12,17 @@ permissions:

jobs:
test:
runs-on: ubuntu-20.04
name: Test
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
- name: Setup Java
uses: actions/setup-java@d854b6da19cdadd9a010605529e522c2393ebd38 # tag=v3
with:
distribution: adopt
java-version: 11
cache: gradle
distribution: temurin
java-version: 17
- name: Setup Gradle
uses: gradle/gradle-build-action@c295a4096e1d2c453eaf1f65c6f96686e26bd8be # tag=v2
- name: Run test task
run: ./gradlew --build-cache --no-daemon --info test
run: ./gradlew test
7 changes: 4 additions & 3 deletions .github/workflows/gradlew-update.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
name: Gradle update
name: Gradle / Update wrapper

on:
schedule:
- cron: '0 4 * * *'

jobs:
update:
runs-on: ubuntu-20.04
if: github.repository == 'jellyfin/jellyfin-androidtv'
name: Update
runs-on: ubuntu-22.04
if: ${{ contains(github.repository_owner, 'jellyfin') }}
steps:
- name: Checkout repository
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/gradlew-validate.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Gradle validate
name: Gradle / Validate wrapper

on:
push:
Expand All @@ -13,7 +13,8 @@ permissions:

jobs:
validate:
runs-on: ubuntu-20.04
name: Validate
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Merge conflict labeler
name: Repo / Label merge conflict

on:
push:
Expand All @@ -8,8 +8,9 @@ on:

jobs:
triage:
runs-on: ubuntu-20.04
if: github.repository == 'jellyfin/jellyfin-androidtv'
name: Triage
runs-on: ubuntu-22.04
if: ${{ contains(github.repository_owner, 'jellyfin') }}
steps:
- uses: eps1lon/actions-label-merge-conflict@b8bf8341285ec9a4567d4318ba474fee998a6919 # tag=v2.0.1
with:
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/repo-stale.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Issue stale check
name: Repo / Reply stale issue

on:
schedule:
Expand All @@ -10,9 +10,10 @@ permissions:
pull-requests: write

jobs:
stale:
runs-on: ubuntu-20.04
if: github.repository == 'jellyfin/jellyfin-androidtv'
triage:
name: Triage
runs-on: ubuntu-22.04
if: ${{ contains(github.repository_owner, 'jellyfin') }}
steps:
- uses: actions/stale@3de2653986ebd134983c79fe2be5d45cc3d9f4e1 # tag=v6
with:
Expand All @@ -25,7 +26,7 @@ jobs:
stale-issue-label: stale
stale-issue-message: |-
This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments.
If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or master branch, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label.
This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on [Matrix or Social Media](https://docs.jellyfin.org/general/getting-help.html).

0 comments on commit a4fbb20

Please sign in to comment.