diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..3ac23b8 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,47 @@ +on: + push: + branches: + - release/major + 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/major + 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\:major + env: + VSCE_PAT: ${{ secrets.VSCE_PAT }}