Skip to content

stormphlegyas is running CI/CD πŸš€ #41

stormphlegyas is running CI/CD πŸš€

stormphlegyas is running CI/CD πŸš€ #41

Workflow file for this run

name: CI/CD
run-name: ${{ github.actor }} is running CI/CD πŸš€
on:
pull_request:
branches: [ master ]
push:
branches: [ master ]
if: "!contains(github.event.head_commit.message, '[skip ci]')"
jobs:
test:
name: Run tests
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: sudo apt-get install xvfb
- run: npm install
- run: xvfb-run -a npm run test -- --headless
deploy:
name: Deploy to Marketplace
needs: test
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
runs-on: ubuntu-latest
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Node.js environment
uses: actions/setup-node@v2
with:
node-version: 18.x
- name: Install dependencies
run: npm install
- name: Install vsce tool
run: npm install -g vsce
- name: Publish to Marketplace
run: vsce publish -p ${{ secrets.VSCE_PAT }}
push:
name: Push changes
needs: deploy
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
token: ${{ secrets.GH_PAT }}
- name: Configure Git
run: |
git config --global user.email "[email protected]"
git config --global user.name "Moustoifa Moumini"
- name: Increment version
run: npm version patch
- name: Push changes to branch
run: git push origin master