feat: add CI build and release workflows
Some checks failed
Build / build (pull_request) Failing after 1m37s
Some checks failed
Build / build (pull_request) Failing after 1m37s
This commit introduces two new GitHub Actions workflows: - `build.yaml`: Configures a workflow for building the project on pushes to the `master` branch and on pull requests. - `release.yaml`: Configures a workflow for releasing the project on tagged pushes, specifically for tags starting with 'v'. It builds the project, releases it using Gradle, and uploads the generated APK artifacts.
This commit is contained in:
parent
4b0c4c406f
commit
e43082df0a
2 changed files with 56 additions and 0 deletions
24
.github/workflows/build.yaml
vendored
Normal file
24
.github/workflows/build.yaml
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
name: Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
java-version: '11'
|
||||
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew composeApp:buildDebug
|
32
.github/workflows/release.yaml
vendored
Normal file
32
.github/workflows/release.yaml
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
java-version: '11'
|
||||
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew composeApp:buildDebug
|
||||
|
||||
- name: Gradle Release
|
||||
run: ./gradlew composeApp:debug
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: app
|
||||
path: composeApp/build/outputs/apk/debug/*.apk
|
Loading…
Add table
Add a link
Reference in a new issue