Skip to content

feat: ✨ 支持在插画主页follow作者 #11

feat: ✨ 支持在插画主页follow作者

feat: ✨ 支持在插画主页follow作者 #11

Workflow file for this run

name: CI
on:
push:
# branches: [ "master" ]
tags:
- v*.*.*
jobs:
build-windows:
runs-on: windows-latest
permissions:
contents: read
steps:
# - name: Cancel previous runs
# uses: styfle/[email protected]
# with:
# access_token: ${{ secrets.ACCESS_TOKEN }}
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0
- name: Build with Gradle Wrapper
run: ./gradlew packageReleaseDistributionForCurrentOS
env:
APP_VERSION_NAME: ${{ github.ref_name }}
- name: zip artifact
run: powershell -Command "Compress-Archive -Path 'composeApp\build\compose\binaries\main-release\app\Pixiv-MultiPlatform' -DestinationPath 'composeApp\build\compose\binaries\main-release\app\windows.zip'"
- name: Upload windows artifact
uses: actions/upload-artifact@v4
with:
name: windows.zip
path: composeApp\build\compose\binaries\main-release\app\windows.zip
build-linux:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
# - name: Cancel previous runs
# uses: styfle/[email protected]
# with:
# access_token: ${{ secrets.ACCESS_TOKEN }}
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0
- name: Build with Gradle Wrapper
run: |
chmod +x ./gradlew
./gradlew packageReleaseDistributionForCurrentOS
env:
APP_VERSION_NAME: ${{ github.ref_name }}
- name: Zip artifact
run: tar -czvf linux.tar.gz composeApp/build/compose/binaries/main-release/app/*
- name: Upload linux artifact
uses: actions/upload-artifact@v4
with:
name: linux.tar.gz
path: linux.tar.gz
build-android:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
# - name: Cancel previous runs
# uses: styfle/[email protected]
# with:
# access_token: ${{ secrets.ACCESS_TOKEN }}
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0
- name: Build with Gradle Wrapper
run: |
chmod +x ./gradlew
./gradlew assembleRelease
env:
APP_VERSION_NAME: ${{ github.ref_name }}
- name: Rename apk
run: |
mv composeApp/build/outputs/apk/release/composeApp-release.apk composeApp/build/outputs/apk/release/android.apk
- name: Upload APK
uses: actions/upload-artifact@v4
with:
name: android.apk
path: composeApp/build/outputs/apk/release/android.apk
create-release:
runs-on: ubuntu-latest
needs: [ build-windows, build-android, build-linux ]
steps:
- name: Download Artifact
uses: actions/download-artifact@v4
with:
path: build
- name: Show file list
run: ls -lR
- name: Create Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref_name }}
files: |
build/windows.zip/windows.zip
build/android.apk/android.apk
build/linux.tar.gz/linux.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}