From 0fe6bd4fb8441a94a0f0e25d930417a6caa8d10b Mon Sep 17 00:00:00 2001 From: Ulysses Zhan Date: Sat, 9 Nov 2024 22:57:31 -0800 Subject: [PATCH] fix multi-platform artifact --- .github/workflows/test.yml | 10 +++++----- action.yml | 12 +++++++++--- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0af7a6b..5191aff 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,10 +1,8 @@ on: push: - branches: - - master + branches: [master] pull_request: - branches: - - master + branches: [master] jobs: generate: @@ -36,7 +34,7 @@ jobs: permissions: write-all runs-on: ubuntu-latest needs: generate - + steps: - name: Download (Ubuntu) uses: actions/download-artifact@v4 @@ -48,11 +46,13 @@ jobs: uses: actions/download-artifact@v4 with: name: stats-windows-latest + path: grs - name: Download (macOS) uses: actions/download-artifact@v4 with: name: stats-macos-latest + path: grs - name: Push uses: crazy-max/ghaction-github-pages@v4 diff --git a/action.yml b/action.yml index b0ace50..56fd4cb 100644 --- a/action.yml +++ b/action.yml @@ -17,6 +17,10 @@ inputs: description: GitHub token; normally no need to set it required: false default: ${{ github.server_url == 'https://github.com' && github.token || '' }} +branding: + color: green + icon: bar-chart + runs: using: composite steps: @@ -27,18 +31,23 @@ runs: echo "lock=$(pwd)/package-lock.json" >> $GITHUB_OUTPUT cd $GITHUB_WORKSPACE shell: bash + # This step is needed because ${{ github.action_path }} has relative pathing (it ends with /./), + # which leads to an error in the setup-node step. + - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: '20' cache: npm cache-dependency-path: ${{ steps.lock.output.lock }} + - name: CI run: | cd $GITHUB_ACTION_PATH npm ci cd $GITHUB_WORKSPACE shell: bash + - name: Run run: node $GITHUB_ACTION_PATH/index.js env: @@ -47,6 +56,3 @@ runs: GRS_PATH: ${{ inputs.path }} PAT_1: ${{ inputs.token }} shell: bash -branding: - color: green - icon: bar-chart