Bump vue-tsc from 2.1.6 to 2.1.10 in /modules/web #288
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 Build | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'CHANGELOG.md' | |
pull_request: | |
workflow_dispatch: | |
# watch: | |
# types: [started] | |
# schedule: | |
# - cron: '0 4 * * *' | |
#concurrency: | |
# group: ${{ github.ref }}-${{ github.workflow }} | |
# cancel-in-progress: true | |
jobs: | |
prepare: | |
runs-on: ubuntu-latest | |
env: | |
GIT_TOKEN: ${{secrets.ACTIONS_TOKEN}} | |
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' | |
outputs: | |
version: ${{ steps.set-ver.outputs.version }} | |
# play: ${{ steps.check.outputs.play }} | |
# sign: ${{ steps.check.outputs.sign }} | |
steps: | |
- name: Setup timezone | |
uses: hoang-rio/[email protected] | |
with: | |
timezoneLinux: 'Asia/Shanghai' | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
token: ${{env.GIT_TOKEN}} | |
- id: set-ver | |
run: | | |
echo "version=$(date -d "8 hour" -u +3.%y.%m%d%H%M)" >> $GITHUB_OUTPUT | |
# - id: check | |
# run: | | |
# if [ ! -z "${{ secrets.RELEASE_KEY_STORE }}" ]; then | |
# echo "sign=yes" >> $GITHUB_OUTPUT | |
# fi | |
# if [ ! -z "${{ secrets.SERVICE_ACCOUNT_JSON }}" ]; then | |
# echo "play=yes" >> $GITHUB_OUTPUT | |
# fi | |
build: | |
needs: prepare | |
# if: ${{ needs.prepare.outputs.sign }} | |
strategy: | |
matrix: | |
product: [Google] | |
type: [Firefly] | |
fail-fast: false | |
runs-on: ubuntu-latest | |
env: | |
GIT_TOKEN: ${{secrets.ACTIONS_TOKEN}} | |
product: ${{ matrix.product }} | |
type: ${{ matrix.type }} | |
VERSION: ${{ needs.prepare.outputs.version }} | |
# play: ${{ needs.prepare.outputs.play }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: 17 | |
- name: Clear 18PlusList.txt | |
run: | | |
echo "清空18PlusList.txt" | |
echo "">$GITHUB_WORKSPACE/app/src/main/assets/18PlusList.txt | |
- name: Release Apk Sign | |
run: | | |
echo "给apk增加签名" | |
cp $GITHUB_WORKSPACE/.github/workflows/firefly.jks $GITHUB_WORKSPACE/app/firefly.jks | |
sed '$a\RELEASE_STORE_FILE=./firefly.jks' $GITHUB_WORKSPACE/gradle.properties -i | |
sed '$a\RELEASE_KEY_ALIAS=YueDu-Firefly' $GITHUB_WORKSPACE/gradle.properties -i | |
sed '$a\RELEASE_STORE_PASSWORD=YueDu-Firefly' $GITHUB_WORKSPACE/gradle.properties -i | |
sed '$a\RELEASE_KEY_PASSWORD=YueDu-Firefly' $GITHUB_WORKSPACE/gradle.properties -i | |
- name: Set up Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
- name: Build With Gradle | |
run: | | |
typeName="Firefly" | |
sed "s/'.release'/'.Firefly'/" $GITHUB_WORKSPACE/app/build.gradle -i | |
sed 's/.release/.Firefly/' $GITHUB_WORKSPACE/app/google-services.json -i | |
echo "统一版本号" | |
sed "/def version/c def version = \"${{ env.VERSION }}\"" $GITHUB_WORKSPACE/app/build.gradle -i | |
echo "开始进行${{ env.product }}.$typeName构建" | |
chmod +x gradlew | |
./gradlew assemble${{ env.product }}release --build-cache --parallel --daemon --warning-mode all | |
echo "修改文件名" | |
mkdir -p ${{ github.workspace }}/apk/ | |
for file in `ls ${{ github.workspace }}/app/build/outputs/apk/*/*/*.apk`; do | |
mv "$file" ${{ github.workspace }}/apk/YueDu.${{ env.product }}.$typeName.${{ env.VERSION }}.apk | |
done | |
- name: Upload App To Artifact | |
uses: actions/[email protected] | |
with: | |
name: YueDu.${{ env.product }}.${{ env.type }} | |
path: ${{ github.workspace }}/apk/*.apk | |
- name: Release | |
# if: ${{ env.product == 'Google' }} | |
uses: softprops/action-gh-release@v2 | |
with: | |
name: YueDu.${{ env.VERSION }} | |
tag_name: ${{ env.VERSION }} | |
# body: ${{ env.CHANGE }} | |
body_path: ${{ github.workspace }}/app/src/main/assets/updateLog.md | |
generate_release_notes: true | |
# append_body: true | |
token: ${{env.GIT_TOKEN}} | |
draft: false | |
prerelease: false | |
files: ${{ github.workspace }}/apk/YueDu.*.apk | |
# - name: Prepare For GooglePlay | |
# if: env.product == 'Google' && env.play == 'yes' | |
# run: | | |
# mkdir -p ReleaseNotes | |
# ln -s ${{ github.workspace }}/CHANGELOG.md ReleaseNotes/whatsnew-en-US | |
# ln -s ${{ github.workspace }}/CHANGELOG.md ReleaseNotes/whatsnew-zh-CN | |
# | |
# - name: Release To GooglePlay | |
# if: env.product == 'google' && env.play == 'yes' | |
# uses: r0adkll/upload-google-play@v1 | |
# with: | |
# serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }} | |
# packageName: io.legado.play | |
# releaseFiles: ${{ github.workspace }}/apk/YueDu.Google.*.apk | |
# track: production | |
# whatsNewDirectory: ${{ github.workspace }}/ReleaseNotes | |
# release_Branch: | |
# needs: [prepare, build] | |
# runs-on: ubuntu-latest | |
# if: ${{ github.actor == 'LM-Firefly' }} | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - uses: actions/download-artifact@v4 | |
# with: | |
# path: apk/ | |
# - working-directory: apk/ | |
# run: mv */*.apk . ;rm -rf */ | |
# - name: Push Assets To "release" Branch | |
# run: | | |
# cd $GITHUB_WORKSPACE/apk/ | |
# git config --global user.name "github-actions[bot]" | |
# git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
# git init | |
# git checkout -b release | |
# git remote add origin "https://${{ github.actor }}:${{ secrets.ACTIONS_TOKEN }}@github.com/${{ github.actor }}/${{ github.repository }}/release" | |
# git add *.apk | |
# git commit -m "${{ env.VERSION }}" | |
# git push -f -u origin release | |
- name: Purge Jsdelivr Cache | |
if: ${{ github.actor == 'LM-Firefly' }} | |
run: | | |
result=$(curl -s https://purge.jsdelivr.net/gh/${{ github.actor }}/${{ github.repository }}/release@release/) | |
if echo $result |grep -q 'success.*true'; then | |
echo "jsdelivr缓存更新成功" | |
else | |
echo $result | |
fi |