Nightly Build #14
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: Nightly Build | |
| on: | |
| workflow_run: | |
| workflows: ["Build"] | |
| branches: ["master"] | |
| types: | |
| - completed | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| if: > | |
| github.event.workflow_run.conclusion == 'success' && | |
| contains(github.event.workflow_run.head_commit.message, '[publish]') | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Download Android APKs | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: aimi-android-apks | |
| path: artifacts/android/ | |
| run-id: ${{ github.event.workflow_run.id }} | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Download Windows Build | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: aimi-windows | |
| path: artifacts/windows/ | |
| run-id: ${{ github.event.workflow_run.id }} | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Download Linux Build | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: aimi-linux | |
| path: artifacts/linux/ | |
| run-id: ${{ github.event.workflow_run.id }} | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Zip Builds | |
| run: | | |
| cd artifacts/windows && zip -r ../../aimi-windows.zip . && cd ../.. | |
| cd artifacts/linux && zip -r ../../aimi-linux.zip . && cd ../.. | |
| - name: Create Nightly Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: nightly-${{ github.event.workflow_run.head_sha }} | |
| name: Nightly Build ${{ github.event.workflow_run.head_sha }} | |
| body: Automated nightly build for commit ${{ github.event.workflow_run.head_sha }} | |
| prerelease: true | |
| target_commitish: ${{ github.event.workflow_run.head_sha }} | |
| files: | | |
| artifacts/android/*.apk | |
| aimi-windows.zip | |
| aimi-linux.zip | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |