mirror of
https://github.com/movie-web/native-app.git
synced 2025-09-13 12:23:24 +00:00
feat: release job in workflow
This commit is contained in:
48
.github/workflows/build-mobile.yml
vendored
48
.github/workflows/build-mobile.yml
vendored
@@ -46,11 +46,14 @@ jobs:
|
|||||||
- name: Build Android app
|
- name: Build Android app
|
||||||
run: cd apps/mobile/android && ./gradlew assembleRelease
|
run: cd apps/mobile/android && ./gradlew assembleRelease
|
||||||
|
|
||||||
|
- name: Rename apk
|
||||||
|
run: mv apps/mobile/android/app/build/outputs/apk/release/app-release.apk apps/mobile/android/app/build/outputs/apk/release/movie-web.apk
|
||||||
|
|
||||||
- name: Upload movie-web.apk as artifact
|
- name: Upload movie-web.apk as artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: apk
|
name: apk
|
||||||
path: ./apps/mobile/android/app/build/outputs/apk/release/app-release.apk
|
path: ./apps/mobile/android/app/build/outputs/apk/release/movie-web.apk
|
||||||
|
|
||||||
build-ios:
|
build-ios:
|
||||||
runs-on: macos-13
|
runs-on: macos-13
|
||||||
@@ -95,3 +98,46 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: ipa
|
name: ipa
|
||||||
path: ./apps/mobile/ios/build/movie-web.ipa
|
path: ./apps/mobile/ios/build/movie-web.ipa
|
||||||
|
|
||||||
|
release-app:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [build-android, build-ios]
|
||||||
|
if: github.ref == 'refs/heads/master'
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Automated Version Bump
|
||||||
|
uses: phips28/gh-action-bump-version@v10.1.1
|
||||||
|
with:
|
||||||
|
skip-tag: 'true'
|
||||||
|
commit-message: 'chore: bump version to {{version}} [skip ci]'
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
PACKAGEJSON_DIR: 'apps/mobile'
|
||||||
|
|
||||||
|
- name: Download build artifacts
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
merge-multiple: true
|
||||||
|
|
||||||
|
- name: Get package version
|
||||||
|
id: package-version
|
||||||
|
uses: martinbeentjes/npm-get-version-action@v1.3.1
|
||||||
|
with:
|
||||||
|
path: apps/mobile
|
||||||
|
|
||||||
|
- name: Create GitHub Release
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
with:
|
||||||
|
tag_name: v${{ steps.package-version.outputs.current-version }}
|
||||||
|
files: |
|
||||||
|
movie-web.apk
|
||||||
|
movie-web.ipa
|
||||||
|
fail_on_unmatched_files: true
|
||||||
|
token: ${{ env.GITHUB_TOKEN }}
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
Reference in New Issue
Block a user