Files
QieKan-3.0/.github/workflows/test.yml
T
2024-08-27 12:15:44 +08:00

277 lines
9.4 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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"