277 lines
9.4 KiB
YAML
277 lines
9.4 KiB
YAML
name: Test Build
|
||
|
||
on:
|
||
push:
|
||
branches:
|
||
- master
|
||
paths:
|
||
- '**'
|
||
# - '!**/assets/**'
|
||
# - '!**.md'
|
||
- '!**/ISSUE_TEMPLATE/**'
|
||
- '!**/modules/web/**'
|
||
pull_request:
|
||
paths-ignore:
|
||
- '**/modules/web/**'
|
||
workflow_run:
|
||
workflows: [Build Web]
|
||
branches: [master]
|
||
types:
|
||
- completed
|
||
workflow_dispatch:
|
||
|
||
concurrency:
|
||
group: ${{ github.workflow }}-${{ github.ref }}
|
||
cancel-in-progress: true
|
||
|
||
jobs:
|
||
|
||
prepare:
|
||
runs-on: ubuntu-latest
|
||
if: ${{ !startsWith(github.event.head_commit.message, 'Merge pull request') }}
|
||
outputs:
|
||
version: ${{ steps.set-ver.outputs.version }}
|
||
versionL: ${{ steps.set-ver.outputs.versionL }}
|
||
lanzou: ${{ steps.check.outputs.lanzou }}
|
||
telegram: ${{ steps.check.outputs.telegram }}
|
||
steps:
|
||
- id: set-ver
|
||
run: |
|
||
echo "version=$(date -d "8 hour" -u +3.%y.%m%d%H)" >> $GITHUB_OUTPUT
|
||
echo "versionL=$(date -d "8 hour" -u +3.%y.%m%d%H%M)" >> $GITHUB_OUTPUT
|
||
- id: check
|
||
run: |
|
||
if [ ${{ secrets.LANZOU_ID }} ]; then
|
||
echo "lanzou=yes" >> $GITHUB_OUTPUT
|
||
fi
|
||
if [ ${{ secrets.BOT_TOKEN }} ]; then
|
||
echo "telegram=yes" >> $GITHUB_OUTPUT
|
||
fi
|
||
|
||
build:
|
||
needs: prepare
|
||
strategy:
|
||
matrix:
|
||
product: [ app ]
|
||
type: [ release, releaseA ]
|
||
fail-fast: false
|
||
runs-on: ubuntu-latest
|
||
env:
|
||
product: ${{ matrix.product }}
|
||
type: ${{ matrix.type }}
|
||
VERSION: ${{ needs.prepare.outputs.version }}
|
||
VERSIONL: ${{ needs.prepare.outputs.versionL }}
|
||
steps:
|
||
- uses: actions/checkout@v4
|
||
with:
|
||
fetch-depth: 0
|
||
- name: Set up JDK 17
|
||
uses: actions/setup-java@v4
|
||
with:
|
||
distribution: 'temurin'
|
||
java-version: 17
|
||
- name: Clear 18PlusList.txt
|
||
run: |
|
||
echo "清空18PlusList.txt"
|
||