From 0c9b2acc4ff24298989bbeb3fb5e47406c36d71d Mon Sep 17 00:00:00 2001 From: BlankParticle Date: Sun, 24 Mar 2024 23:51:21 +0530 Subject: [PATCH] ci: add relase workfolw --- .github/workflows/build.yml | 50 +++++++++++++++++++++++++++++++++++++ .github/workflows/ci.yml | 6 ++--- 2 files changed, 52 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..7f51f82 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,50 @@ +name: Build and Release ๐Ÿ— + +on: + push: + tags: + - "v*" + +jobs: + test: + runs-on: ubuntu-latest + permissions: + contents: write + + steps: + - name: Checkout Code ๐Ÿ›Ž + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup pnpm ๐Ÿ“ฆ + uses: pnpm/action-setup@v2 + with: + version: "8" + + - name: Setup Node.js ๐ŸŸฉ + uses: actions/setup-node@v4 + with: + cache: "pnpm" + node-version: "20" + + - name: Add Gnome Extension Tools ๐Ÿงฉ + run: | + apt update + apt install -y gnome-shell-extensions + + - name: Install Dependencies ๐Ÿ“ฅ + run: pnpm install + + - name: Build ๐Ÿ— + run: pnpm build + + - name: Release ๐Ÿš€ + uses: softprops/action-gh-release@v2 + with: + files: dist/*.shell-extension.zip + token: ${{ secrets.GITHUB_TOKEN }} + tag_name: ${{ github.ref }} + body: "Release ${{ github.ref }}" + draft: false + prerelease: false diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 058d843..994b049 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,11 +1,10 @@ -name: Code Quality +name: Code Quality ๐Ÿงน on: push: branches: - master pull_request: - jobs: test: @@ -21,13 +20,12 @@ jobs: uses: pnpm/action-setup@v2 with: version: "8" - + - name: Setup Node.js ๐ŸŸฉ uses: actions/setup-node@v4 with: cache: "pnpm" node-version: "20" - - name: Install Dependencies ๐Ÿ“ฅ run: pnpm install