Skip to content

Commit

Permalink
fix publish - remove volta
Browse files Browse the repository at this point in the history
remove volta and use pnpm setup instead, which also sets up node
  • Loading branch information
patricklx committed Nov 14, 2023
1 parent 8d269b7 commit 252338c
Showing 1 changed file with 31 additions and 37 deletions.
68 changes: 31 additions & 37 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -285,30 +277,34 @@ 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:
name: Publish Firefox extension
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:
Expand All @@ -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
Expand Down

0 comments on commit 252338c

Please sign in to comment.