-
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.
ci: add linter and release workflow, remove manual vercel deployment (#…
…24) * ci: remove manual vercel deployment workflow * ci: separate build workflow * ci: add linter ci * ci: add release ci * ci: release workflow -- fix path * ci: release workflow -- use tag name on zip file * fix typo workflow name * ci: add workflow_call on build.yaml * fix build release zip path * test linter * test linter error catch * add linter errors annotation matcher * revert linter error test * nits: add Release Workflows name
- Loading branch information
Showing
4 changed files
with
118 additions
and
132 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,49 @@ | ||
name: Build | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
workflow_call: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Cardinal Editor | ||
uses: actions/checkout@v4 | ||
- uses: pnpm/action-setup@v3 | ||
with: | ||
version: 8 | ||
- name: Get pnpm store directory | ||
shell: bash | ||
run: | | ||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | ||
- uses: actions/cache@v4 | ||
name: Setup pnpm cache | ||
with: | ||
path: ${{ env.STORE_PATH }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
- name: Install dependencies | ||
run: pnpm install | ||
- name: Build | ||
run: pnpm build | ||
- name: Archive Release | ||
uses: thedoctor0/[email protected] | ||
with: | ||
type: 'zip' | ||
filename: 'cardinal-editor.zip' | ||
path: ./dist/ | ||
- name: Upload Build to Github artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: cardinal-editor | ||
path: cardinal-editor.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,38 @@ | ||
name: Lint | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
push: | ||
branches: | ||
- main | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
lint-ts: | ||
name: Typescript | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Cardinal Editor | ||
uses: actions/checkout@v4 | ||
- uses: pnpm/action-setup@v3 | ||
with: | ||
version: 8 | ||
- name: Get pnpm store directory | ||
shell: bash | ||
run: | | ||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | ||
- uses: actions/cache@v4 | ||
name: Setup pnpm cache | ||
with: | ||
path: ${{ env.STORE_PATH }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
- name: Install dependencies | ||
run: pnpm install | ||
- name: Lint | ||
run: pnpm lint |
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: Release | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
uses: ./.github/workflows/build.yaml | ||
|
||
release: | ||
name: Release Build Package | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- name: Download Cardinal-Editor build | ||
uses: actions/download-artifact@v4 | ||
- name: Rename build with tag | ||
run: | | ||
ls -R | ||
mv cardinal-editor/cardinal-editor.zip cardinal-editor-${{ github.event.release.tag_name }}.zip | ||
- name: Publish Build to corresponding Github Release | ||
uses: skx/github-action-publish-binaries@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
args: 'cardinal-editor-${{ github.event.release.tag_name }}.zip' |