-
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.
ci: Standardize github actions with my other repos
- Loading branch information
Showing
3 changed files
with
52 additions
and
101 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,34 @@ | ||
name: Release | ||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
validate: | ||
uses: './.github/workflows/validate.yml' | ||
|
||
publish: | ||
runs-on: ubuntu-22.04 | ||
needs: | ||
- validate | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: ./.github/actions/setup | ||
|
||
- name: Bump and Tag | ||
run: | | ||
git config user.email "[email protected]" | ||
git config user.name "GitHub Actions" | ||
pnpx changelogen@latest --release | ||
git push | ||
git push --tags | ||
- name: NPM | ||
run: | | ||
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" > ~/.npmrc | ||
pnpm publish | ||
- name: GitHub Release | ||
run: pnpx changelogen@latest gh release --token ${{ secrets.GITHUB_TOKEN }} |
64 changes: 18 additions & 46 deletions
64
.github/workflows/verify.yml → .github/workflows/validate.yml
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,69 +1,41 @@ | ||
name: Verify | ||
name: Validate | ||
on: [push, workflow_call] | ||
|
||
jobs: | ||
verify: | ||
name: Verify Code | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v2 | ||
|
||
- uses: pnpm/[email protected] | ||
name: Install PNPM | ||
- uses: actions/checkout@v3 | ||
- uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
|
||
- name: Install Node | ||
uses: actions/setup-node@v2 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
cache: 'pnpm' | ||
|
||
- name: Install Dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Formatting | ||
run: pnpm format:check | ||
|
||
- name: Type Check | ||
run: pnpm compile | ||
|
||
- name: Build | ||
run: pnpm build | ||
|
||
- name: Lint | ||
run: pnpm lint | ||
|
||
- name: Test | ||
run: pnpm test | ||
|
||
- name: Check CLI | ||
run: node bin/publish-extension.cjs --help | ||
cache: pnpm | ||
- run: pnpm install | ||
- run: pnpm format:check | ||
- run: pnpm compile | ||
- run: pnpm build | ||
- run: pnpm lint | ||
- run: pnpm test | ||
- run: node bin/publish-extension.cjs --help | ||
|
||
e2e-test: | ||
name: E2E Publish Test | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v2 | ||
|
||
- uses: pnpm/[email protected] | ||
name: Install PNPM | ||
- uses: actions/checkout@v3 | ||
- uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
|
||
- name: Install Node 16 | ||
uses: actions/setup-node@v2 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
cache: 'pnpm' | ||
|
||
- name: Install Dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Publish | ||
run: ./scripts/dev.sh all | ||
cache: pnpm | ||
- run: pnpm install | ||
- run: ./scripts/dev.sh all | ||
env: | ||
CHROME_EXTENSION_ID: ${{ secrets.TEST_CHROME_EXTENSION_ID }} | ||
CHROME_CLIENT_ID: ${{ secrets.TEST_CHROME_CLIENT_ID }} | ||
|