-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add actions to publish the extension
- Loading branch information
Showing
1 changed file
with
114 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
name: Release | ||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
jobs: | ||
build: | ||
name: Build | ||
timeout-minutes: 10 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.13.1 | ||
cache: yarn | ||
cache-dependency-path: ./yarn.lock | ||
|
||
- name: Install deps | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Build extension | ||
run: yarn build | ||
|
||
- name: Save extension | ||
id: cache-extention | ||
uses: actions/cache@v4 | ||
with: | ||
path: public/web-ext-artifacts | ||
key: extension-${{ github.run_id }} | ||
|
||
publish-firefox: | ||
name: Publish Firefox | ||
timeout-minutes: 10 | ||
runs-on: ubuntu-latest | ||
needs: [build] | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.13.1 | ||
cache: yarn | ||
cache-dependency-path: ./yarn.lock | ||
|
||
- name: Install deps | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Restore extension | ||
id: cache-extention | ||
uses: actions/cache@v4 | ||
with: | ||
path: public/build | ||
key: extension-${{ github.run_id }} | ||
|
||
- name: Publish | ||
run: yarn web-ext-submit | ||
|
||
publish-chrome: | ||
name: Publish Chrome | ||
timeout-minutes: 10 | ||
runs-on: ubuntu-latest | ||
needs: [build] | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.13.1 | ||
cache: yarn | ||
cache-dependency-path: ./yarn.lock | ||
|
||
- name: Install deps | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Restore extension | ||
id: cache-extention | ||
uses: actions/cache@v4 | ||
with: | ||
path: public/build | ||
key: extension-${{ github.run_id }} | ||
|
||
- name: Publish | ||
run: yarn chrome-webstore-upload upload --source "web-ext-artifacts/conventional_comments-${GITHUB_REF:1}.zip" --auto-publish | ||
|
||
create-release: | ||
name: Create Release | ||
timeout-minutes: 10 | ||
runs-on: ubuntu-latest | ||
needs: [publish-firefox, publish-chrome] | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Restore extension | ||
id: cache-extention | ||
uses: actions/cache@v4 | ||
with: | ||
path: public/build | ||
key: extension-${{ github.run_id }} | ||
|
||
- name: Create release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
artifacts: "web-ext-artifacts/*.zip" |