diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml new file mode 100644 index 0000000..f0fcf15 --- /dev/null +++ b/.github/workflows/nix.yml @@ -0,0 +1,62 @@ +name: Build + +on: + pull_request: + push: + # branches: [46key-layout] + branches: [fcitx5-android] + +jobs: + develop: + runs-on: ubuntu-24.04 + steps: + - name: Fetch source code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + submodules: recursive + # - uses: cachix/install-nix-action@v30 + # with: + # github_access_token: ${{ secrets.GITHUB_TOKEN }} + # - uses: cachix/cachix-action@v15 + # with: + # name: fcitx5-android + # authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" + # - name: decode-base64-github-action + # uses: akiojin/decode-base64-github-action@v1.0.2 + # with: + # base64: ${{ secrets.STORE_FILE_BASE64 }} + # output-path: ${{ github.workspace }}/release-key.jks + # - name: Apply patch + # if: ${{ matrix.patch != '46key' }} + # run: | + # git apply patches/${{ matrix.patch }}.patch + # - name: Build Release APK + # env: + # STORE_PASSWORD: ${{ secrets.STORE_PASSWORD }} + # KEY_ALIAS: ${{ secrets.KEY_ALIAS }} + # KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} + # STORE_FILE: ${{ github.workspace }}/release-key.jks + # run: | + # git tag -d 26key 35key 45key 45key-numbers 46key + # nix develop .#noAS --command ./gradlew app:assembleRelease + - name: Create release + uses: softprops/action-gh-release@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + append_body: true + prerelease: true + tag_name: "test" + name: "${{ matrix.patch }} Layout Release" + body: "\n## Image\n![image](https://raw.githubusercontent.com/MOldtime/Pictrue/refs/heads/master/1584768629373.png)" + files: | + ./*.png + +# uses: marvinpinto/action-automatic-releases@latest +# with: +# repo_token: ${{ secrets.GITHUB_TOKEN }} +# automatic_release_tag: ${{ matrix.patch }} +# prerelease: true +# title: "${{ matrix.patch }} Layout Release" +# files: | +# app/build/outputs/apk/release/*.apk