From 4da5f26d890bfb800b7d0a55fb953a60953da137 Mon Sep 17 00:00:00 2001 From: Youssef Amr El-Shehaby Date: Tue, 12 Dec 2023 15:39:37 +0200 Subject: [PATCH] chore: create a github action --- .github/workflows/publish.yml | 47 +++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..9c79ced --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,47 @@ +on: + push: + branches: + - release/minor + release: + types: + - created +jobs: + merge: + needs: build + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Configure Git + run: | + git config --global user.email "youssef.amr90@gmail.com" + git config --global user.name "monstajoe2002" + - name: Merge to master + run: | + git checkout master + git merge --no-ff release/minor + git push origin master + build: + strategy: + matrix: + os: [macos-latest, ubuntu-latest, windows-latest] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Install Node.js + uses: actions/setup-node@v3 + with: + node-version: 16.x + - run: npm install + publish: + needs: build + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Publish + if: success() && startsWith(github.ref, 'refs/tags/') + run: npm run deploy\:minor + env: + VSCE_PAT: ${{ secrets.VSCE_PAT }}