github.com/pojntfx/hydrapp/hydrapp@v0.0.0-20240516002902-d08759d6ca9f/pkg/generators/hydrapp.yaml.tpl (about) 1 name: hydrapp CI 2 3 on: 4 push: 5 pull_request: 6 schedule: 7 - cron: "0 0 * * 0" 8 9 jobs: 10 build-linux: 11 runs-on: ubuntu-latest 12 permissions: 13 contents: read 14 strategy: 15 matrix: 16 target: 17 # {{ .AppID }} 18 - id: hydrapp-apk.{{ .AppID }} 19 src: . 20 pkg: . 21 exclude: deb|dmg|flatpak|msi|rpm|binaries|tests 22 tag: main 23 dst: out/* 24 - id: hydrapp-deb.{{ .AppID }} 25 src: . 26 pkg: . 27 exclude: apk|dmg|flatpak|msi|rpm|binaries|tests 28 tag: main 29 dst: out/* 30 - id: hydrapp-dmg.{{ .AppID }} 31 src: . 32 pkg: . 33 exclude: apk|deb|flatpak|msi|rpm|binaries|tests 34 tag: main 35 dst: out/* 36 - id: hydrapp-flatpak.{{ .AppID }} 37 src: . 38 pkg: . 39 exclude: apk|deb|dmg|msi|rpm|binaries|tests 40 tag: main 41 dst: out/* 42 - id: hydrapp-msi.{{ .AppID }} 43 src: . 44 pkg: . 45 exclude: apk|deb|flatpak|dmg|rpm|binaries|tests 46 tag: main 47 dst: out/* 48 - id: hydrapp-rpm.{{ .AppID }} 49 src: . 50 pkg: . 51 exclude: apk|deb|flatpak|dmg|msi|binaries|tests 52 tag: main 53 dst: out/* 54 - id: hydrapp-binaries.{{ .AppID }} 55 src: . 56 pkg: . 57 exclude: apk|deb|flatpak|dmg|msi|rpm|tests 58 tag: main 59 dst: out/* 60 - id: hydrapp-tests.{{ .AppID }} 61 src: . 62 pkg: . 63 exclude: apk|deb|flatpak|dmg|msi|rpm|binaries 64 tag: main 65 dst: out/* 66 67 steps: 68 - name: Maximize build space 69 run: | 70 sudo rm -rf /usr/share/dotnet 71 sudo rm -rf /usr/local/lib/android 72 sudo rm -rf /opt/ghc 73 - name: Checkout 74 uses: actions/checkout@v4 75 - name: Set up QEMU 76 uses: docker/setup-qemu-action@v1 77 - name: Set up Docker Buildx 78 uses: docker/setup-buildx-action@v1 79 - name: Set up hydrapp 80 run: | 81 curl -L -o /tmp/hydrapp "https://github.com/pojntfx/hydrapp/releases/latest/download/hydrapp.linux-$(uname -m)" 82 sudo install /tmp/hydrapp /usr/local/bin 83 - name: Setup Java/APK keystore 84 working-directory: . 85 env: 86 JAVA_KEYSTORE: {{"${{"}} secrets.JAVA_KEYSTORE {{"}}"}} 87 run: echo "${JAVA_KEYSTORE}" | base64 -d >'/tmp/keystore.jks' 88 - name: Setup PGP key 89 working-directory: . 90 env: 91 PGP_KEY: {{"${{"}} secrets.PGP_KEY {{"}}"}} 92 run: echo "${PGP_KEY}" | base64 -d >'/tmp/pgp.asc' 93 - name: Build with hydrapp 94 working-directory: {{"${{"}} matrix.target.src {{"}}"}} 95 env: 96 HYDRAPP_JAVA_KEYSTORE: /tmp/keystore.jks 97 HYDRAPP_JAVA_KEYSTORE_PASSWORD: {{"${{"}} secrets.JAVA_KEYSTORE_PASSWORD {{"}}"}} 98 HYDRAPP_JAVA_CERTIFICATE_PASSWORD: {{"${{"}} secrets.JAVA_CERTIFICATE_PASSWORD {{"}}"}} 99 100 HYDRAPP_PGP_KEY: /tmp/pgp.asc 101 HYDRAPP_PGP_KEY_PASSWORD: {{"${{"}} secrets.PGP_KEY_PASSWORD {{"}}"}} 102 HYDRAPP_PGP_KEY_ID: {{"${{"}} secrets.PGP_KEY_ID {{"}}"}} 103 run: | 104 hydrapp build --config='./{{"${{"}} matrix.target.pkg {{"}}"}}/hydrapp.yaml' --exclude='{{"${{"}} matrix.target.exclude {{"}}"}}' \ 105 --pull=true --tag='{{"${{"}} matrix.target.tag {{"}}"}}' \ 106 --dst="${PWD}/out/{{"${{"}} matrix.target.pkg {{"}}"}}" --src="${PWD}" \ 107 --concurrency="$(nproc)" 108 - name: Upload output 109 uses: actions/upload-artifact@v4 110 with: 111 name: {{"${{"}} matrix.target.id {{"}}"}} 112 path: {{"${{"}} matrix.target.dst {{"}}"}} 113 114 publish-linux: 115 runs-on: ubuntu-latest 116 permissions: 117 contents: write 118 pages: write 119 id-token: write 120 needs: build-linux 121 environment: 122 name: github-pages 123 url: {{"${{"}} steps.publish.outputs.page_url {{"}}"}} 124 125 steps: 126 - name: Checkout 127 uses: actions/checkout@v4 128 - name: Download output 129 uses: actions/download-artifact@v4 130 with: 131 path: /tmp/out 132 - name: Isolate the repositories 133 run: | 134 mkdir -p /tmp/github-pages 135 for dir in /tmp/out/*/; do 136 rsync -a "${dir}"/ /tmp/github-pages/ 137 done 138 139 touch /tmp/github-pages/.nojekyll 140 - name: Add index for repositories 141 run: | 142 sudo apt update 143 sudo apt install -y tree 144 145 cd /tmp/github-pages/ 146 tree --timefmt '%Y-%m-%dT%H:%M:%SZ' -T 'hydrapp Repositories' --du -h -D -H . -o 'index.html' 147 - name: Setup GitHub Pages 148 uses: actions/configure-pages@v5 149 - name: Upload GitHub Pages artifact 150 uses: actions/upload-pages-artifact@v3 151 with: 152 path: /tmp/github-pages/ 153 - name: Publish to GitHub pages 154 id: publish 155 uses: actions/deploy-pages@v4 156