generated from Debdut/browser-extension
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CI and fix lint. +semver:set:1.0.0+0
- Loading branch information
1 parent
bf97ec0
commit b0de741
Showing
11 changed files
with
275 additions
and
163 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
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,74 @@ | ||
name: Build | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
version_full: | ||
required: true | ||
type: string | ||
version_major: | ||
required: true | ||
type: string | ||
version_minor: | ||
required: true | ||
type: string | ||
version_patch: | ||
required: true | ||
type: string | ||
version_build: | ||
required: true | ||
type: string | ||
current_branch: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
include: | ||
- os: ubuntu-latest | ||
browser: chrome | ||
- os: ubuntu-latest | ||
browser: firefox | ||
- os: ubuntu-latest | ||
browser: edge | ||
- os: macos-latest | ||
browser: safari | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '21' | ||
|
||
- name: Set Version | ||
run: npm version --no-git-tag-version --allow-same-version ${{ inputs.version_full }} | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Build | ||
run: npm run build ${{ matrix.browser }} | ||
|
||
- name: Generate Safari Project | ||
if: matrix.browser == 'safari' | ||
run: npm run build-safari | ||
|
||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: extension-${{ matrix.browser }} | ||
path: dist/${{ matrix.browser }} | ||
|
||
- name: Upload Safari Project | ||
if: matrix.browser == 'safari' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: extension-safari-project | ||
path: xcode/ | ||
|
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,24 @@ | ||
name: Lint | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '21' | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Lint | ||
run: npx eslint src | ||
|
||
|
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,39 @@ | ||
name: main | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
concurrency: | ||
group: ${{ github.repository }}-${{ github.workflow }}-${{ github.ref }}-${{ github.ref == 'refs/heads/main' && github.sha || ''}} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
determine-version: | ||
uses: StaflSystems/CustomGitHubActions/.github/workflows/determine-version.yml@main | ||
secrets: inherit | ||
|
||
lint: | ||
uses: ./.github/workflows/lint.yml | ||
secrets: inherit | ||
|
||
build: | ||
uses: ./.github/workflows/build.yml | ||
secrets: inherit | ||
needs: [ determine-version ] | ||
with: | ||
version_full: ${{ needs.determine-version.outputs.version_full }} | ||
version_major: ${{ needs.determine-version.outputs.version_major }} | ||
version_minor: ${{ needs.determine-version.outputs.version_minor }} | ||
version_patch: ${{ needs.determine-version.outputs.version_patch }} | ||
version_build: ${{ needs.determine-version.outputs.version_build }} | ||
current_branch: ${{ needs.determine-version.outputs.current_branch }} | ||
|
||
tag: | ||
uses: ./.github/workflows/tag.yml | ||
secrets: inherit | ||
needs: [ determine-version, build, lint ] | ||
with: | ||
version_full: ${{ needs.determine-version.outputs.version_full }} |
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,27 @@ | ||
name: tag | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
version_full: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
tag: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download Release Artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
path: release-artifacts | ||
pattern: extension-* | ||
merge-multiple: true | ||
|
||
- name: Create a GitHub release | ||
if: github.ref == 'refs/heads/main' | ||
uses: StaflSystems/release-action@main | ||
with: | ||
artifacts: "release-artifacts/*" | ||
tag: ${{ inputs.version_full }} | ||
commit: ${{ github.sha }} |
Oops, something went wrong.