Skip to content

Commit

Permalink
chore: add actions
Browse files Browse the repository at this point in the history
  • Loading branch information
lizyChy0329 committed Aug 30, 2024
1 parent a7a13f5 commit 4b32afa
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 1 deletion.
35 changes: 35 additions & 0 deletions .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: autofix.ci

on:
push:
branches:
- main

pull_request:
branches:
- main

jobs:
autofix:
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4

- uses: actions/setup-node@v4
with:
node-version: lts/*
cache: pnpm
registry-url: 'https://registry.npmjs.org'

- name: Install Dependencies
run: pnpm i

- name: Lint
run: pnpm lint:fix

- uses: autofix-ci/action@v1
42 changes: 42 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Release

on:
push:
tags:
- 'v*'

jobs:
release:
permissions:
id-token: write
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Set node
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: pnpm
registry-url: 'https://registry.npmjs.org'

- run: pnpm dlx changelogithub
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Install Dependencies
run: pnpm i

- name: PNPM build
run: pnpm run build

- name: Publish to VSCE
run: pnpm dlx @vscode/vsce publish --no-dependencies
env:
VSCE_TOKEN: ${{secrets.VSCE_TOKEN}}
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@
"typecheck": "tsc --noEmit",
"vscode:prepublish": "pnpm run build",
"package": "vsce package --no-dependencies",
"publish": "vsce publish --no-dependencies"
"publish": "vsce publish --no-dependencies",
"lint": "eslint .",
"lint:fix": "eslint . --fix"
},
"devDependencies": {
"@antfu/eslint-config": "^2.27.1",
Expand Down

0 comments on commit 4b32afa

Please sign in to comment.