v1.6.9 #66
Workflow file for this run
This file contains hidden or 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: Build wikilite | |
| on: | |
| release: | |
| types: [published] | |
| permissions: | |
| contents: write | |
| env: | |
| APP: wikilite | |
| jobs: | |
| build: | |
| name: Build ${{ matrix.goos }}/${{ matrix.goarch }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| include: | |
| - goos: linux | |
| goarch: amd64 | |
| os: ubuntu-latest | |
| cgo: 0 | |
| - goos: linux | |
| goarch: arm64 | |
| os: ubuntu-24.04-arm | |
| cgo: 0 | |
| - goos: linux | |
| goarch: arm | |
| goarm: 7 | |
| os: ubuntu-latest | |
| cgo: 0 | |
| - goos: windows | |
| goarch: amd64 | |
| os: windows-latest | |
| cgo: 0 | |
| - goos: windows | |
| goarch: arm64 | |
| os: ubuntu-latest | |
| cgo: 0 | |
| - goos: darwin | |
| goarch: amd64 | |
| os: macos-15-intel | |
| cgo: 0 | |
| - goos: darwin | |
| goarch: arm64 | |
| os: macos-latest | |
| cgo: 0 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - uses: actions/setup-go@v4 | |
| with: | |
| go-version: '1.24' | |
| - name: Install MinGW (Windows AMD64 CGO) | |
| if: matrix.os == 'windows-latest' && matrix.cgo == 1 | |
| run: | | |
| choco install mingw -y | |
| - name: Build | |
| env: | |
| GOOS: ${{ matrix.goos }} | |
| GOARCH: ${{ matrix.goarch }} | |
| GOARM: ${{ matrix.goarm }} | |
| CGO_ENABLED: ${{ matrix.cgo }} | |
| shell: bash | |
| run: | | |
| mkdir -p dist | |
| EXT="" | |
| if [ "$GOOS" = "windows" ]; then EXT=".exe"; fi | |
| LDFLAGS="-s -w" | |
| if [ "$GOOS" = "linux" ]; then | |
| LDFLAGS="-s -w -extldflags -static" | |
| fi | |
| go build -ldflags="$LDFLAGS" -o dist/${{ env.APP }}${EXT} ./app | |
| - name: Archive | |
| shell: bash | |
| run: | | |
| EXT="" | |
| if [ "${{ matrix.goos }}" = "windows" ]; then EXT=".exe"; fi | |
| ARCH_NAME="${{ matrix.goarch }}" | |
| if [ "$ARCH_NAME" = "arm" ]; then ARCH_NAME="arm32"; fi | |
| ASSET_NAME="${{ env.APP }}-${{ matrix.goos }}-${ARCH_NAME}.tar.gz" | |
| echo "ASSET_NAME=$ASSET_NAME" >> $GITHUB_ENV | |
| tar -C dist -czvf $ASSET_NAME ${{ env.APP }}${EXT} | |
| - name: Upload Release Asset | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: ${{ env.ASSET_NAME }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| build-android-apk: | |
| name: Build Android APK | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - uses: actions/setup-go@v4 | |
| with: | |
| go-version: '1.24' | |
| - name: Set up JDK | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Build Libraries (Make) | |
| run: make | |
| - name: Build AAB | |
| run: | | |
| cd android && ./gradlew bundleRelease --no-daemon --warning-mode all | |
| - name: Sign AAB | |
| id: sign_app_aab | |
| uses: kevin-david/zipalign-sign-android-release@v2 | |
| with: | |
| releaseDirectory: android/app/build/outputs/bundle/release | |
| signingKeyBase64: ${{ secrets.ANDROID_KEYSTORE }} | |
| alias: ${{ secrets.ANDROID_KEYSTORE_ALIAS }} | |
| keyStorePassword: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }} | |
| keyPassword: ${{ secrets.ANDROID_KEY_PASSWORD }} | |
| env: | |
| BUILD_TOOLS_VERSION: "34.0.0" | |
| - name: Rename AAB | |
| run: | | |
| cp android/app/build/outputs/bundle/release/app-release.aab ${{ env.APP }}-android.aab | |
| - name: Build APK | |
| run: | | |
| cd android && ./gradlew assembleRelease --no-daemon --warning-mode all | |
| - name: Sign APK | |
| id: sign_app_apk | |
| uses: kevin-david/zipalign-sign-android-release@v2 | |
| with: | |
| releaseDirectory: android/app/build/outputs/apk/release | |
| signingKeyBase64: ${{ secrets.ANDROID_KEYSTORE }} | |
| alias: ${{ secrets.ANDROID_KEYSTORE_ALIAS }} | |
| keyStorePassword: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }} | |
| keyPassword: ${{ secrets.ANDROID_KEY_PASSWORD }} | |
| env: | |
| BUILD_TOOLS_VERSION: "34.0.0" | |
| - name: Rename APK | |
| run: | | |
| cp android/app/build/outputs/apk/release/app-release-unsigned-signed.apk ${{ env.APP }}-android.apk | |
| - name: Upload Release Assets | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: | | |
| ${{ env.APP }}-android.apk | |
| ${{ env.APP }}-android.aab | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |