-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ci): add nightly builds, rename zips (#509)
Co-authored-by: Radu-Cristian Popa <[email protected]>
- Loading branch information
1 parent
3fa28fb
commit 6fffd49
Showing
8 changed files
with
334 additions
and
6 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,15 @@ | ||
// @ts-check | ||
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-var-requires */ | ||
const path = require('node:path') | ||
const fs = require('node:fs/promises') | ||
|
||
/** | ||
* Retrieves the manifest version from the built extension. | ||
* @param {import('github-script').AsyncFunctionArguments} AsyncFunctionArguments | ||
*/ | ||
module.exports = async ({ core }) => { | ||
const manifestPath = path.join(__dirname, 'dist', 'chrome', 'manifest.json') | ||
const manifest = await fs.readFile(manifestPath, 'utf8').then(JSON.parse) | ||
|
||
core.setOutput('version', manifest.version) | ||
} |
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
name: Environment setup | ||
description: Sets up Node and pnpm | ||
|
||
runs: | ||
using: 'composite' | ||
|
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,51 @@ | ||
name: Nightly build | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * 1-6' | ||
workflow_dispatch: | ||
inputs: {} | ||
|
||
permissions: | ||
contents: write | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
build-nightly: | ||
name: Create Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Environment setup | ||
uses: ./.github/actions/setup | ||
|
||
- name: Build | ||
run: pnpm build --channel=nightly | ||
|
||
- name: Get built version | ||
uses: actions/github-script@v7 | ||
id: version | ||
with: | ||
script: | | ||
const script = require('./.github/actions/get-built-version.cjs') | ||
await script({ github, context, core }) | ||
- name: Delete existing release | ||
run: gh release delete nightly --cleanup-tag --yes | ||
continue-on-error: true | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
|
||
- name: Create GH Release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
files: | | ||
dist/*.zip | ||
tag_name: 'nightly' | ||
name: Nightly ${{ steps.version.outputs.version }} | ||
prerelease: 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 |
---|---|---|
|
@@ -16,6 +16,7 @@ data-testid | |
nums | ||
|
||
# scripts and 3rd party terms | ||
nvmrc | ||
typecheck | ||
prettiercache | ||
corepack | ||
|
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
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
Oops, something went wrong.