update openCook version to 0.2 #30
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: CI | |
| # Builds a debug APK on every push to main and publishes it as a rolling | |
| # "dev-build" prerelease. Manual runs are allowed from the Actions tab. | |
| on: | |
| push: | |
| branches: | |
| - 'main' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Setup JDK | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: "zulu" | |
| java-version: "21" | |
| - name: Build APK | |
| run: ./gradlew assembleDebug | |
| # Re-publish the rolling "dev-build" prerelease at the current commit. Uses the | |
| # preinstalled gh CLI with the workflow's contents:write token (the old | |
| # marvinpinto action fails with "Resource not accessible by integration"). | |
| - name: Publish dev-build prerelease | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| # Notes = latest commit subject + disclaimer. Written via git (not shell- | |
| # interpolated) so backticks/$ in the message can't be evaluated. | |
| { | |
| git log -1 --pretty=format:'%s' | |
| printf '\n\nLatest development build from main. May contain bugs; no automatic updates.\n' | |
| } > release-notes.md | |
| gh release delete dev-build --yes --cleanup-tag || true | |
| gh release create dev-build \ | |
| app/build/outputs/apk/debug/openCook-debug.apk \ | |
| --prerelease \ | |
| --target "$GITHUB_SHA" \ | |
| --title "openCook development build" \ | |
| --notes-file release-notes.md |