Skip to content

Commit

Permalink
Revise Github Actions workflows for automated releases
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Bestavros <markbest@bu.edu>
  • Loading branch information
mbestavros committed Jun 17, 2023
1 parent ec9c065 commit bc121db
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Breezy Weather CI
name: Breezy Weather - Pull Request CI

on:
push:
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Breezy Weather Release

on:
push:
branches: [ main ]
tags: [ v* ]
paths-ignore:
- ".editorconfig"
- "fastlane/*"
- "work/*"
- "CONTRIBUTE.md"
- "FEATURES.md"
- "LICENSE"
- "PROVIDERS.md"
- "README.md"

jobs:
release-build:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')

steps:
- uses: actions/checkout@v3
- name: set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'temurin'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
- name: Upload APK
uses: actions/upload-artifact@v3
with:
name: BreezyWeather_fdroidDebug.apk
path: app/build/outputs/apk/fdroid/debug/BreezyWeather.apk
- name: Create Github Release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
prerelease: true
files: |
app/build/outputs/apk/fdroid/debug/BreezyWeather.apk
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -258,4 +258,4 @@ dependencies {

// debugImplementation because LeakCanary should only run in debug builds.
//debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.11'
}
}

0 comments on commit bc121db

Please sign in to comment.