-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): update ci workflow to use release-please
- Loading branch information
Showing
6 changed files
with
165 additions
and
24 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,50 @@ | ||
name: 'pre-release' | ||
|
||
# Updates the "latest" tag to the current head when new pushes are | ||
# made to main and updates the "Latest Development Build" release with | ||
# artifacts from this revision | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
pre-release: | ||
name: 'Pre Release' | ||
runs-on: 'ubuntu-latest' | ||
permissions: 'write-all' | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v4 | ||
with: | ||
version: 8 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'pnpm' | ||
|
||
- name: Install | ||
run: pnpm install | ||
|
||
- name: Build project | ||
run: npm run build | ||
|
||
- name: Archive build artifacts | ||
run: | | ||
zip -r nrk-dual-subs-chrome.zip .output/chrome-mv3/ | ||
- name: Create prerelease | ||
uses: marvinpinto/action-automatic-releases@v1.2.1 | ||
with: | ||
repo_token: '${{ secrets.GITHUB_TOKEN }}' | ||
title: 'Latest Development Build' | ||
automatic_release_tag: 'latest' | ||
prerelease: true | ||
files: | | ||
nrk-dual-subs-chrome.zip |
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,31 @@ | ||
name: Build and test PR | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
|
||
jobs: | ||
smoke_test: | ||
name: Smoke test | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v4 | ||
with: | ||
version: 8 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'pnpm' | ||
|
||
- name: Install | ||
run: pnpm install | ||
|
||
- name: Build project | ||
run: npm run build |
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,20 @@ | ||
name: Check and prepare PR | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened, edited] | ||
|
||
permissions: | ||
checks: 'write' | ||
contents: 'write' | ||
pull-requests: 'read' | ||
|
||
jobs: | ||
lint_title: | ||
name: Conventional commit PR title | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: amannn/action-semantic-pull-request@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,63 @@ | ||
name: 'Release' | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
release: | ||
name: 'Release' | ||
runs-on: 'ubuntu-latest' | ||
permissions: 'write-all' | ||
|
||
steps: | ||
- uses: googleapis/release-please-action@v4 | ||
id: release | ||
with: | ||
release-type: node | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
if: ${{ steps.release.outputs.release_created }} | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v4 | ||
with: | ||
version: 8 | ||
|
||
- name: Setup Node | ||
if: ${{ steps.release.outputs.release_created }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'pnpm' | ||
|
||
- name: Install | ||
if: ${{ steps.release.outputs.release_created }} | ||
run: pnpm install | ||
|
||
- name: Build project | ||
if: ${{ steps.release.outputs.release_created }} | ||
run: pnpm build | ||
|
||
- name: Archive build artifacts | ||
if: ${{ steps.release.outputs.release_created }} | ||
run: | | ||
zip -r nrk-dual-subs-chrome.zip .output/chrome-mv3/ | ||
- name: Upload release artifact | ||
if: ${{ steps.release.outputs.release_created }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
gh release upload ${{ steps.release.outputs.tag_name }} nrk-dual-subs-chrome.zip | ||
- name: Publish Extension | ||
uses: Klemensas/chrome-extension-upload-action@master | ||
with: | ||
refresh-token: ${{ secrets.CHROME_STORE_REFRESH_TOKEN }} | ||
client-id: ${{ secrets.CHROME_STORE_CLIENT_ID }} | ||
client-secret: ${{ secrets.CHROME_STORE_CLIENT_SECRET }} | ||
app-id: ${{ secrets.CHROME_STORE_APP_ID }} | ||
file-name: './nrk-dual-subs-chrome.zip' | ||
publish: true |
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 @@ | ||
20.11.1 |