Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create all-new CI workflows #69

Merged
merged 9 commits into from
Nov 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/build-debug.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This workflow builds debug binaries and uploads them for every push to main
name: build-debug

on:
push:
branches:
- 'main'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: 11
cache: 'gradle'

- name: Assemble Debug
run: ./gradlew assembleDebug

- name: Upload APK
uses: actions/upload-artifact@v3
with:
name: apk
path: app/build/outputs/apk/debug/**.apk
43 changes: 0 additions & 43 deletions .github/workflows/build.yaml

This file was deleted.

29 changes: 29 additions & 0 deletions .github/workflows/create-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This workflow creates a release and uploads release binaries for each new tag created
name: create-release

on:
push:
tags:
- v*

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: 11
cache: 'gradle'

- name: Build App
run: ./gradlew assembleRelease

- name: Release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
files: |
app/build/outputs/apk/release/**.apk
16 changes: 16 additions & 0 deletions .github/workflows/notify-build-debug-complete.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# This workflow notifies Discord when `build-debug` succeeds
name: notify-build-debug-complete

on:
workflow_run:
workflows: [build-debug]
types: [completed]

jobs:
on-complete:
runs-on: ubuntu-latest
steps:
- name: Notify workflow completed
uses: sarisia/actions-status-discord@v1
with:
webhook: ${{ secrets.CI_BUILDS_WEBHOOK }}
15 changes: 15 additions & 0 deletions .github/workflows/notify-release-created.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# This workflow notifies Discord when a release is created
name: notify-build-debug-complete

on:
release:
types: [published]

jobs:
on-complete:
runs-on: ubuntu-latest
steps:
- name: Notify workflow completed
uses: sarisia/actions-status-discord@v1
with:
webhook: ${{ secrets.RELEASES_WEBHOOK }}
18 changes: 0 additions & 18 deletions .github/workflows/octocatgirl.yml

This file was deleted.

28 changes: 28 additions & 0 deletions .github/workflows/pull-request-checks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This workflow runs checks against pull requests to ensure it builds and meets code quality standards
name: pull-request-checks

on:
pull_request:
branches:
- 'main'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: 11
cache: 'gradle'

- name: Assemble Debug
run: ./gradlew assembleDebug

- name: Upload APK
uses: actions/upload-artifact@v3
with:
name: apk
path: app/build/outputs/apk/debug/**.apk