chore: 🤖 workflow #13
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: HyperFlow Release | |
| on: push | |
| # on: | |
| # push: | |
| # tags: | |
| # - "hyper-flow-v[0-9]+.[0-9]+.[0-9]+" | |
| jobs: | |
| publish_on_win: | |
| name: Build HyperFlow on Windows | |
| runs-on: windows-latest | |
| # Tests timeout after 40 minutes | |
| timeout-minutes: 40 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20.19.3" | |
| cache: "yarn" | |
| cache-dependency-path: yarn.lock | |
| - name: Run version update | |
| run: node ./scripts/update-package-version.js --prefix "hyper-flow-v" | |
| - name: Get yarn cache directory path | |
| id: yarn-cache-dir-path | |
| run: | | |
| echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | |
| echo "version=$(yarn -v)" >> $GITHUB_OUTPUT | |
| - name: Restore node_modules | |
| uses: actions/cache/restore@v3 | |
| id: cache-node-modules | |
| with: | |
| path: | | |
| **/node_modules | |
| **/.eslintcache | |
| ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
| key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
| - name: Install node_modules on cache miss | |
| if: steps.cache-node-modules.outputs.cache-hit != 'true' | |
| run: yarn install --frozen-lockfile --network-timeout 1000000 | |
| - name: Cache node_modules | |
| if: steps.cache-node-modules.outputs.cache-hit != 'true' | |
| uses: actions/cache/save@v3 | |
| with: | |
| path: | | |
| ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
| '**/node_modules' | |
| key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
| - name: Build | |
| run: yarn build | |
| - name: Release | |
| run: yarn nx run hyper-flow:publish:app | |
| env: | |
| APPLE_ID: ${{ secrets.APPLE_ID }} | |
| APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} | |
| APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | |
| SIGN_ID: ${{ secrets.SIGN_ID }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| publish_on_linux: | |
| name: Publish HyperFlow on Linux | |
| runs-on: ubuntu-latest | |
| # Tests timeout after 40 minutes | |
| timeout-minutes: 40 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20.19.3" | |
| cache: "yarn" | |
| cache-dependency-path: yarn.lock | |
| - name: Get yarn cache directory path | |
| id: yarn-cache-dir-path | |
| run: | | |
| echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | |
| echo "version=$(yarn -v)" >> $GITHUB_OUTPUT | |
| - name: Restore node_modules | |
| uses: actions/cache/restore@v3 | |
| id: cache-node-modules | |
| with: | |
| path: | | |
| **/node_modules | |
| **/.eslintcache | |
| ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
| key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
| - name: Install node_modules on cache miss | |
| if: steps.cache-node-modules.outputs.cache-hit != 'true' | |
| run: yarn install --frozen-lockfile | |
| - name: Cache node_modules | |
| if: steps.cache-node-modules.outputs.cache-hit != 'true' | |
| uses: actions/cache/save@v3 | |
| with: | |
| path: | | |
| ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
| '**/node_modules' | |
| key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
| - name: Build | |
| run: yarn build | |
| - name: Release | |
| run: yarn nx run hyper-flow:publish:app | |
| env: | |
| APPLE_ID: ${{ secrets.APPLE_ID }} | |
| APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} | |
| APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | |
| SIGN_ID: ${{ secrets.SIGN_ID }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| publish_on_mac: | |
| name: Publish HyperFlow on Mac | |
| runs-on: macos-latest | |
| # Tests timeout after 40 minutes | |
| timeout-minutes: 40 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20.19.3" | |
| cache: "yarn" | |
| cache-dependency-path: yarn.lock | |
| - name: Install Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.11" | |
| - name: Import codesign certs | |
| uses: apple-actions/import-codesign-certs@v3 | |
| with: | |
| p12-file-base64: ${{ secrets.APPSTORE_CERTIFICATES_FILE_BASE64 }} | |
| p12-password: ${{ secrets.APPSTORE_CERTIFICATES_PASSWORD }} | |
| - name: Get yarn cache directory path | |
| id: yarn-cache-dir-path | |
| run: | | |
| echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | |
| echo "version=$(yarn -v)" >> $GITHUB_OUTPUT | |
| - name: Restore node_modules | |
| uses: actions/cache/restore@v3 | |
| id: cache-node-modules | |
| with: | |
| path: | | |
| **/node_modules | |
| **/.eslintcache | |
| ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
| key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
| - name: Install node_modules on cache miss | |
| if: steps.cache-node-modules.outputs.cache-hit != 'true' | |
| run: yarn install --frozen-lockfile | |
| - name: Install macos-alias | |
| run: yarn add [email protected] -W | |
| - name: Rebuild native modules | |
| run: | | |
| npm install -g node-gyp | |
| npm rebuild | |
| yarn install --frozen-lockfile --force | |
| - name: Cache node_modules | |
| if: steps.cache-node-modules.outputs.cache-hit != 'true' | |
| uses: actions/cache/save@v3 | |
| with: | |
| path: | | |
| ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
| '**/node_modules' | |
| key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
| - name: Build | |
| run: yarn build | |
| - name: Release | |
| run: yarn nx run hyper-flow:publish:app | |
| env: | |
| APPLE_ID: ${{ secrets.APPLE_ID }} | |
| APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} | |
| APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | |
| SIGN_ID: ${{ secrets.SIGN_ID }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |