diff --git a/.github/workflows/release__.yml b/.github/workflows/release__.yml deleted file mode 100644 index 880d98cbc..000000000 --- a/.github/workflows/release__.yml +++ /dev/null @@ -1,300 +0,0 @@ -#name: Build Release -# -#on: -# push: -# branches: -# - 'master' -## - 'build' -# tags: -# - v* -# - '!v*ios' -# - '!v*apk' -# - '!v*mac' -# - '!v*win' -# - '!v*.flutter2' -# - '!v*.bot' -#env: -# APP_DEV_PROVISION_PATH: '/tmp/app_dev.mobileprovision' -# -#concurrency: -# group: ${{ github.workflow }}-${{ github.ref_name }} -# cancel-in-progress: true -# -#jobs: -# Build_and_upload: -# name: Build releases -# strategy: -# fail-fast: false -# matrix: -# include: -# - target: android -# os: ubuntu-latest -# flutter_version: '3.10' -# flutter_channel: 'stable' -# artifact_name: release-apk -# artifact_path: build/app/outputs/apk/release/*.apk -# - target: ios -# os: macos-12 -# flutter_version: '3.10' -# flutter_channel: 'stable' -# artifact_name: release-ios -# artifact_path: build/ios/ipa/*.ipa -# - target: macos -# os: macos-12 -# flutter_version: '3.10' -# flutter_channel: 'stable' -# artifact_name: release-mac -# artifact_path: build/macos/*.zip -# - target: windows -# os: windows-latest -# flutter_version: '3.10' -# flutter_channel: 'stable' -# artifact_name: release-windows -# artifact_path: build/windows/*.zip -# -# runs-on: ${{ matrix.os }} -# steps: -# - name: Checkout -# uses: actions/checkout@v3 -# with: -# submodules: 'recursive' -# -## - name: Cache Flutter (Linux) -## if: matrix.os == 'ubuntu-latest' -## uses: actions/cache@v3 -## with: -## key: ${{ runner.os }}-flutter-${{ hashFiles('**/pubspec.lock') }} -## path: /opt/hostedtoolcache/flutter -## restore-keys: | -## ${{ runner.os }}-flutter- -## -## - name: Cache Flutter (MacOS) -## if: matrix.os == 'macos-12' -## uses: actions/cache@v3 -## with: -## key: ${{ runner.os }}-flutter-${{ hashFiles('**/pubspec.lock') }} -## path: /Users/runner/hostedtoolcache/flutter -## restore-keys: | -## ${{ runner.os }}-flutter- -## -## - name: Cache Flutter (Windows) -## if: matrix.os == 'windows-latest' -## uses: actions/cache@v3 -## with: -## key: ${{ runner.os }}-flutter-${{ hashFiles('**/pubspec.lock') }} -## path: 'C:\hostedtoolcache\windows\flutter' -## restore-keys: | -## ${{ runner.os }}-flutter- -# -## - name: Cache Gradle packages (Android) -## if: matrix.target == 'android' -## uses: actions/cache@v3 -## with: -## path: | -## ~/.gradle/caches -## ~/.gradle/wrapper -## key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} -## restore-keys: | -## ${{ runner.os }}-gradle- -# -# - name: Cache Pods (build macos) -# uses: actions/cache@v3 -# if: matrix.target == 'macos' -# with: -# path: | -# macos/Pods -# key: ${{ runner.os }}-pods-${{ hashFiles('macos/Podfile.lock') }} -# restore-keys: | -# ${{ runner.os }}-pods- -# -# - name: Cache Pods (build ios) -# uses: actions/cache@v3 -# if: matrix.target == 'ios' -# with: -# path: | -# ios/Pods -# key: ${{ runner.os }}-pods-${{ hashFiles('ios/Podfile.lock') }} -# restore-keys: | -# ${{ runner.os }}-pods- -# -# # git-crypt unlock -# - name: Unlock secrets (MacOS) -# if: matrix.os == 'macos-12' -# run: | -# brew install git-crypt -# echo $GIT_CRYPT_KEY | base64 -d -o grypt.key -# git-crypt unlock grypt.key -# env: -# GIT_CRYPT_KEY: ${{ secrets.ENCODED_GIT_CRYPT }} -# -# - name: Unlock secrets (Linux) -# if: matrix.os == 'ubuntu-latest' -# uses: sliteteam/github-action-git-crypt-unlock@1.2.0 -# env: -# GIT_CRYPT_KEY: ${{ secrets.ENCODED_GIT_CRYPT }} -# -# - name: Unlock secrets (Windows) -# if: matrix.os == 'windows-latest' -# run: | -# Invoke-WebRequest -Uri https://github.com/AGWA/git-crypt/releases/download/0.7.0/git-crypt-0.7.0-x86_64.exe -OutFile git-crypt.exe -# echo "${{ secrets.ENCODED_GIT_CRYPT }}" | openssl base64 -d -out git-crypt.key -# .\git-crypt.exe unlock .\git-crypt.key -# -# # 安装证书 -# - name: Install Apple Certificate -# if: matrix.os == 'macos-12' -# uses: apple-actions/import-codesign-certs@v1 -# with: -# p12-file-base64: ${{ secrets.P12_BASE64 }} -# p12-password: ${{ secrets.P12_PASSWORD }} -# -# # 安装描述文件 -# - name: Install the provisioning profile -# if: matrix.os == 'macos-12' -# run: | -# echo $PROVISIONING_CERTIFICATE_BASE64 | base64 -d -o $APP_DEV_PROVISION_PATH -# app_dev_uuid=`grep UUID -A1 -a $APP_DEV_PROVISION_PATH | grep -io "[-A-F0-9]\{36\}"` -# mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles -# cp $APP_DEV_PROVISION_PATH ~/Library/MobileDevice/Provisioning\ Profiles/$app_dev_uuid.mobileprovision -# ls ~/Library/MobileDevice/Provisioning\ Profiles -# env: -# PROVISIONING_CERTIFICATE_BASE64: ${{ secrets.PROVISIONING_PROFILE_BASE64 }} -# -# - name: Decode keystore -# if: matrix.target == 'android' -# run: | -# echo $ENCODED_KEYSTORE | base64 -di > android/app/keystore.jks -# env: -# ENCODED_KEYSTORE: ${{ secrets.ENCODED_KEYSTORE }} -# -# # 安装 JDK -# - name: Setup Java JDK 11 (Android) -# if: matrix.target == 'android' -# uses: actions/setup-java@v3 -# with: -# distribution: 'zulu' -# java-version: '11' -# cache: gradle -# -# # 安装 Flutter -# - name: Flutter action -# uses: subosito/flutter-action@v2 -# with: -## flutter-version: ${{ matrix.flutter_version }} -# channel: ${{ matrix.flutter_channel }} -# -# - name: Build resolve Swift dependencies -# if: matrix.os == 'macos-12' -# run: xcodebuild -resolvePackageDependencies -workspace ios/Runner.xcworkspace -scheme Runner -configuration Release -# -## - name: replace isar -## if: matrix.target == 'windows' -## shell: bash -## run: | -## sed -i "s#isar: ^3.0.2'#isar: 3.0.0-dev.8#g" pubspec.yaml -## git stash -# -# - name: Flutter pub get -# run: | -# git config --global core.longpaths true -# flutter pub get -# flutter pub run build_runner build --delete-conflicting-outputs -# flutter pub run intl_utils:generate -# -# # Get app version -# - name: Get app version -# id: get_version -# shell: bash -# run: | -# echo "::set-output name=version::$(head -n 5 pubspec.yaml | tail -n 1 | cut -d ' ' -f 2)" -# -# # 打包 apk -# - name: Collect Apks -# if: matrix.target == 'android' -# run: flutter build apk --release -# env: -# KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} -# KEY_ALIAS: ${{ secrets.KEY_ALIAS }} -# KEY_PASSWORD: ${{ secrets.KEY_PASSWORD}} -# -# # 打包 ipa -# - name: Build ipa -# if: matrix.target == 'ios' -# run: | -# sed -i '' 's/cn.dev.honjow.fehv/cn.honjow.fehv/g' 'ios/Runner.xcodeproj/project.pbxproj' -# cd ios && pod update && pod install && cd .. -# flutter build ipa --export-options-plist=ExportOptions.plist -# cd build/ios/ipa/ -# mv FEhViewer.ipa FEhViewer_${{ steps.get_version.outputs.version }}.ipa -# -# # 打包 mac -# - name: Build mac app -# if: matrix.target == 'macos' -# run: | -# cd macos && pod update && pod install && cd .. -# flutter build macos --release -# APP_PATH=build/macos/Build/Products/Release/fehviewer.app -# cp -a $APP_PATH ./build -# cd build && zip -qroy macos/FEhViewer_${{ steps.get_version.outputs.version }}_macos.zip fehviewer.app -# -# - name: Build windows -# if: matrix.target == 'windows' -# run: | -# flutter build windows --release -# $DestDir = "build\windows\FEhViewer" -# $SrcDir = "build\windows\runner\Release" -# New-Item -Path $DestDir -ItemType Directory -# Copy-Item $SrcDir\* -Recurse $DestDir -# Copy-Item -Filter *.dll -Path windows\* -Destination $DestDir -Force -# Compress-Archive $DestDir build\windows\FEhViewer_${{ steps.get_version.outputs.version }}_windows.zip -# -# - name: Publish Artifacts -# uses: actions/upload-artifact@v3 -# with: -# name: ${{ matrix.artifact_name }} -# path: ${{ matrix.artifact_path }} -# -# Publish_releases: -# if: startsWith(github.ref, 'refs/tags/') && !contains(github.ref, 'beta') && !contains(github.ref, 'alpha') && !contains(github.ref, 'rc') -# name: Publish releases -# needs: Build_and_upload -# runs-on: ubuntu-latest -# steps: -# - name: Checkout -# uses: actions/checkout@v3 -# - run: mkdir /tmp/artifacts -# - name: Download all Artifacts -# uses: actions/download-artifact@v3 -# with: -# path: /tmp/artifacts -# -# - run: ls -R /tmp/artifacts -# -# # Get app version -# - name: Get app version -# id: get_version -# shell: bash -# run: | -# echo "::set-output name=version::$(head -n 5 pubspec.yaml | tail -n 1 | cut -d ' ' -f 2)" -# -# - name: Upload to release -# uses: ncipollo/release-action@v1 -# with: -# artifacts: "/tmp/artifacts/release-apk/*.apk,/tmp/artifacts/release-ios/*.ipa,/tmp/artifacts/release-mac/*.zip,/tmp/artifacts/release-windows/*.zip" -# tag: ${{ github.ref_name }} -# bodyFile: changelog/v${{ steps.get_version.outputs.version }}.md -# prerelease: contains(github.ref, 'pre') -# allowUpdates: true -# artifactErrorsFailBuild: true -# replacesArtifacts: true -# -# - name: Post release notes -# run: | -# changelog=$(cat changelog/v${{ steps.get_version.outputs.version }}.md) -# curl 'https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage' \ -# --header 'Content-Type: application/x-www-form-urlencoded' \ -# -d parse_mode=markdown \ -# -d chat_id=${{ secrets.TELEGRAM_CHANNEL_ID }} \ -# --data-urlencode text="[FEhViewer_${{ github.ref_name }}](https://github.com/honjow/FEhViewer/releases/tag/${{ github.ref_name }}) -# $changelog" \ -# -d disable_web_page_preview=true \ No newline at end of file