Skip to content

Commit

Permalink
Fix the release process
Browse files Browse the repository at this point in the history
  • Loading branch information
davidfou committed Jun 16, 2024
1 parent 4c1fc04 commit d87da2a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 10 deletions.
35 changes: 26 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ jobs:
id: cache-extention
uses: actions/cache@v4
with:
path: public/web-ext-artifacts
key: extension-${{ github.run_id }}
path: |
web-ext-artifacts
public
key: release-${{ github.run_id }}

publish-firefox:
name: Publish Firefox
Expand All @@ -55,10 +57,16 @@ jobs:
id: cache-extention
uses: actions/cache@v4
with:
path: public/build
key: extension-${{ github.run_id }}
path: |
web-ext-artifacts
public
key: release-${{ github.run_id }}

- name: Publish
env:
EXTENSION_ID: ${{ secrets.EXTENSION_ID }}
WEB_EXT_API_KEY: ${{ secrets.WEB_EXT_API_KEY }}
WEB_EXT_API_SECRET: ${{ secrets.WEB_EXT_API_SECRET }}
run: yarn web-ext-submit

publish-chrome:
Expand All @@ -84,11 +92,18 @@ jobs:
id: cache-extention
uses: actions/cache@v4
with:
path: public/build
key: extension-${{ github.run_id }}
path: |
web-ext-artifacts
public
key: release-${{ github.run_id }}

- name: Publish
run: yarn chrome-webstore-upload upload --source "web-ext-artifacts/conventional_comments-${GITHUB_REF:1}.zip" --auto-publish
env:
CLIENT_ID: ${{ secrets.CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
EXTENSION_ID: ${{ secrets.EXTENSION_ID }}
REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }}
run: yarn chrome-webstore-upload upload --source "web-ext-artifacts/conventional_comments-${GITHUB_REF#refs/tags/v}.zip" --auto-publish

create-release:
name: Create Release
Expand All @@ -105,8 +120,10 @@ jobs:
id: cache-extention
uses: actions/cache@v4
with:
path: public/build
key: extension-${{ github.run_id }}
path: |
web-ext-artifacts
public
key: release-${{ github.run_id }}

- name: Create release
uses: ncipollo/release-action@v1
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"lint:svelte": "svelte-check --fail-on-warnings --fail-on-hints",
"test": "jest",
"version": "node scripts/newVersion.js && git add public/manifest.json",
"postversion": "git push origin master && git push origin refs/tags/v$npm_package_version",
"postversion": "git push origin main && git push origin refs/tags/v$npm_package_version",
"2fa-code": "node scripts/getTwoFactorAuthenticationCode.mjs",
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook",
Expand Down

0 comments on commit d87da2a

Please sign in to comment.