From 10054ccb23932c86a44334d554cf8e8e7a5b649a Mon Sep 17 00:00:00 2001 From: Glory Agatevure Date: Sun, 24 Mar 2024 14:21:57 +0100 Subject: [PATCH] Update main.yml --- .github/workflows/main.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8b13789..325bd75 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1 +1,37 @@ +ame: Release +on: + push: + branches: + - master + +jobs: + release: + name: Release + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup Node.js + uses: actions/setup-node@v2 + with: + node-version: '14' + + - name: Install dependencies + run: npm install + + - name: Run tests + run: npm test + + - name: Bump version + run: npm version patch --no-git-tag-version + + - name: Push changes + run: git push origin master --follow-tags + + - name: Publish to npm + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} + run: npm publish