From 252338ce993d4d245dfba76b957da69beafc351f Mon Sep 17 00:00:00 2001 From: Patrick Pircher Date: Tue, 14 Nov 2023 15:02:22 +0100 Subject: [PATCH] fix publish - remove volta remove volta and use pnpm setup instead, which also sets up node --- .github/workflows/build.yml | 68 +++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 37 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 502bcf65fc..8431625492 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -38,10 +38,8 @@ jobs: run: | echo "GIT_COMMIT_SHA=${GIT_COMMIT_SHA}" >> $GITHUB_ENV echo "GIT_BRANCH=${GIT_BRANCH}" >> $GITHUB_ENV - - name: Set up Volta - uses: volta-cli/action@v4 - - name: setup pnpm - uses: NullVoxPopuli/action-setup-pnpm@v2 + - name: setup pnpm & node + uses: wyvox/action-setup-pnpm@v3 - name: Install dependencies (pnpm) run: pnpm install - name: Lint (hbs) @@ -97,10 +95,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - - name: Set up Volta - uses: volta-cli/action@v4 - - name: setup pnpm - uses: NullVoxPopuli/action-setup-pnpm@v2 + - name: setup pnpm & node + uses: wyvox/action-setup-pnpm@v3 - name: Install dependencies (pnpm) run: pnpm install - name: Set NO_EXTEND_PROTOTYPES @@ -123,10 +119,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - - name: Set up Volta - uses: volta-cli/action@v4 - - name: setup pnpm - uses: NullVoxPopuli/action-setup-pnpm@v2 + - name: setup pnpm & node + uses: wyvox/action-setup-pnpm@v3 - name: Install dependencies (pnpm) run: pnpm install - name: Download panes @@ -258,16 +252,14 @@ jobs: needs: - test - ember-try - - build - if: >- - github.event_name == 'schedule' || - (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')) + - build runs-on: ubuntu-latest steps: - - name: Set up Volta - uses: volta-cli/action@v4 + - run: echo '{}' > package.json + - name: Set up node + uses: actions/setup-node@v4 - name: Install dependencies (chrome-webstore-upload-cli) - run: volta install chrome-webstore-upload-cli + run: npm install -g chrome-webstore-upload-cli - name: Download artifacts (Chrome) uses: actions/download-artifact@v3 with: @@ -285,6 +277,9 @@ jobs: echo "REFRESH_TOKEN=${{ secrets.GOOGLE_STABLE_REFRESH_TOKEN }}" >> $GITHUB_ENV fi - name: Upload to Chrome Web Store + if: >- + github.event_name == 'schedule' || + (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')) run: chrome-webstore-upload upload --source chrome --auto-publish publish-firefox: @@ -292,23 +287,24 @@ jobs: needs: - test - ember-try - - build - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') + - build runs-on: ubuntu-latest steps: - - name: Set up Volta - uses: volta-cli/action@v4 + - run: echo '{}' > package.json + - name: Set up nod + uses: actions/setup-node@v4 - name: Install dependencies (web-ext) run: | - volta install web-ext + npm install -g web-ext # https://github.com/mozilla/web-ext/issues/804 - volta install web-ext-submit + npm install -g web-ext-submit - name: Download artifacts (Firefox) uses: actions/download-artifact@v3 with: name: firefox path: firefox - name: Upload to AMO + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') working-directory: firefox run: web-ext-submit --channel=listed env: @@ -321,28 +317,26 @@ jobs: needs: - test - ember-try - - build - if: >- - github.event_name == 'schedule' || - (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')) + - build runs-on: ubuntu-latest steps: - - name: Set up Volta - uses: volta-cli/action@v4 - - name: Set up NPM - run: | - echo "//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}"> ~/.npmrc - npm whoami - env: - NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} + - name: Set up node + uses: actions/setup-node@v4 - name: Download artifacts (npm) uses: actions/download-artifact@v3 with: name: npm path: npm - name: Publish to npm + if: >- + github.event_name == 'schedule' || + (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')) + env: + NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} working-directory: npm run: | + echo "//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}"> ~/.npmrc + npm whoami if [[ "$GITHUB_EVENT_NAME" == "schedule" ]]; then npm publish --tag alpha else