chore(deps): bump uuid from 11.0.3 to 11.0.5 #277
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
pull_request: | |
push: | |
tags: | |
- 'v*' | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: 'Tag to release' | |
required: false | |
default: 'v0.0.0' | |
permissions: write-all | |
jobs: | |
build-release: | |
name: Release Android | |
runs-on: ubuntu-latest | |
steps: | |
- name: Code Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Java JDK 17 | |
# 需要 Java 17 才能编译 apk, | |
# 且默认情况下该环境(ubuntu-latest)只有 Java 11 | |
uses: actions/[email protected] | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: gradle | |
- name: Setup modern yarn | |
run: | | |
corepack enable | |
yarn set version 4.5.0 | |
- name: Install Dependencies Using yarn | |
run: yarn install | |
- name: Build Android Release | |
run: | | |
cd android | |
chmod +x ./gradlew | |
./gradlew assembleRelease | |
- name: Automatic Releases | |
if: github.event_name == 'push' | |
uses: marvinpinto/[email protected] | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
title: 'Release ${{ github.ref_name }}' | |
files: 'android/app/build/outputs/**/*.apk' | |
prerelease: false | |
- name: Upload Build Artifacts | |
if: github.event_name == 'workflow_dispatch' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: android-release | |
path: android/app/build/outputs/**/*.apk | |
sentry-release: | |
name: Sentry Release | |
if: github.event_name == 'push' | |
needs: build-release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Code Checkout | |
uses: actions/checkout@v4 | |
- name: Sentry Release | |
uses: getsentry/[email protected] | |
env: | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
SENTRY_ORG: ${{ secrets.SENTRY_ORG }} | |
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} | |
with: | |
environment: production | |
version: ${{ github.ref_name }} |