diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..c838b76 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,46 @@ +name: Build and Release +on: + push: + tags: + - "*" +permissions: + contents: write +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository (with Submodules) + uses: actions/checkout@v2 + with: + submodules: recursive + fetch-depth: 0 + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: 8 + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version: "18.x" + cache: "pnpm" + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Build + id: build + run: pnpm run build + + - name: Copy manifest and styles to dist + run: cp src/{manifest.json,styles.css} dist/ + + - name: Release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + name: ${{ github.ref_name }} + tag_name: ${{ github.ref }} + files: | + dist/main.js + dist/manifest.json + dist/styles.css diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b385814..49713bb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -40,9 +40,6 @@ devDependencies: prettier: specifier: ^3.2.5 version: 3.5.1 - tslib: - specifier: ^2.8.1 - version: 2.8.1 typescript: specifier: ^5.7.3 version: 5.7.3 @@ -1162,10 +1159,6 @@ packages: typescript: 5.7.3 dev: true - /tslib@2.8.1: - resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} - dev: true - /type-check@0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'}