CI #71
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 | |
| on: | |
| schedule: | |
| # Run at 16:00 UTC+8 every Tuesday (08:00 UTC) | |
| - cron: "0 8 * * 2" | |
| workflow_dispatch: | |
| inputs: | |
| skip_update: | |
| description: "Skip update step" | |
| default: false | |
| type: boolean | |
| force_release: | |
| description: "Force release" | |
| default: false | |
| type: boolean | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Build project | |
| run: | | |
| pnpm build | |
| rm -rf node_modules | |
| pnpm install --prod | |
| - name: Run CI update command | |
| if: inputs.skip_update != true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| MINIO_ENDPOINT: ${{ secrets.MINIO_ENDPOINT }} | |
| MINIO_ACCESS_KEY: ${{ secrets.MINIO_ACCESS_KEY }} | |
| MINIO_SECRET_KEY: ${{ secrets.MINIO_SECRET_KEY }} | |
| MINIO_BUCKET_NAME: ${{ secrets.MINIO_BUCKET_NAME }} | |
| MINIO_PREFIX: ${{ secrets.MINIO_PREFIX }} | |
| FORCE_RELEASE: ${{ inputs.force_release && '--force-release' || '' }} | |
| run: | | |
| node packages/cli/dist/index.js ci init | |
| node packages/cli/dist/index.js ci update ${{ env.FORCE_RELEASE }} | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ixion-cli | |
| include-hidden-files: true | |
| path: | | |
| node_modules/ | |
| packages/*/dist/ | |
| packages/*/node_modules/ | |
| packages/*/package.json | |
| lib/SaintCoinach/SaintCoinach/Definitions/*.json | |
| lib/EXDSchema/*.yml | |
| .ixion-config.ci.json | |
| package.json | |
| datamining-cn: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Download artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ixion-cli | |
| - uses: actions/checkout@v5 | |
| with: | |
| repository: thewakingsands/ffxiv-datamining-cn | |
| path: ffxiv-datamining-cn | |
| ssh-key: ${{ secrets.SSH_KEY }} | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| - name: Run datamining command | |
| id: export-csv | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| MINIO_ENDPOINT: ${{ secrets.MINIO_ENDPOINT }} | |
| MINIO_ACCESS_KEY: ${{ secrets.MINIO_ACCESS_KEY }} | |
| MINIO_SECRET_KEY: ${{ secrets.MINIO_SECRET_KEY }} | |
| MINIO_BUCKET_NAME: ${{ secrets.MINIO_BUCKET_NAME }} | |
| MINIO_PREFIX: ${{ secrets.MINIO_PREFIX }} | |
| run: | | |
| node packages/cli/dist/index.js ci init | |
| node packages/cli/dist/index.js exd export-csv ffxiv-datamining-cn -s sdo --crlf | |
| - name: Commit | |
| uses: EndBug/add-and-commit@v9 | |
| with: | |
| cwd: ffxiv-datamining-cn | |
| default_author: github_actions | |
| author_name: FFCAFE Automation | |
| message: "ver ${{ steps.export-csv.outputs.version }}" | |
| tag: "ver-${{ steps.export-csv.outputs.version }} --force" | |
| tag_push: "--force" | |
| datamining-tc: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Download artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ixion-cli | |
| - uses: actions/checkout@v5 | |
| with: | |
| repository: thewakingsands/ffxiv-datamining-tc | |
| path: ffxiv-datamining-tc | |
| ssh-key: ${{ secrets.SSH_KEY_TC }} | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| - name: Run datamining command | |
| id: export-csv | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| MINIO_ENDPOINT: ${{ secrets.MINIO_ENDPOINT }} | |
| MINIO_ACCESS_KEY: ${{ secrets.MINIO_ACCESS_KEY }} | |
| MINIO_SECRET_KEY: ${{ secrets.MINIO_SECRET_KEY }} | |
| MINIO_BUCKET_NAME: ${{ secrets.MINIO_BUCKET_NAME }} | |
| MINIO_PREFIX: ${{ secrets.MINIO_PREFIX }} | |
| run: | | |
| node packages/cli/dist/index.js ci init | |
| node packages/cli/dist/index.js exd export-csv ffxiv-datamining-tc -s userjoy --crlf | |
| - name: Commit | |
| uses: EndBug/add-and-commit@v9 | |
| with: | |
| cwd: ffxiv-datamining-tc | |
| default_author: github_actions | |
| author_name: FFCAFE Automation | |
| message: "ver ${{ steps.export-csv.outputs.version }}" | |
| tag: "ver-${{ steps.export-csv.outputs.version }} --force" | |
| tag_push: "--force" |