Skip to content

Merge pull request #35 from melfore/33-create-report #14

Merge pull request #35 from melfore/33-create-report

Merge pull request #35 from melfore/33-create-report #14

Workflow file for this run

name: Clibelt CI - Release
on:
push:
branches:
- master
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
with:
fetch-depth: 0
persist-credentials: false
ref: master
- name: Install NodeJS
uses: actions/setup-node@master
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- name: Cache Dependencies
id: cache-dependencies
uses: actions/cache@master
env:
cache-name: clibelt-dependencies
with:
path: node_modules
key: clibelt-dependencies-${{ hashFiles('**/package-lock.json') }}
- name: Install Dependencies
if: steps.cache-dependencies.outputs.cache-hit != 'true'
run: npm ci
- name: Git Config
run: |
git config --local user.email "actions@github.com"
git config --local user.name "github-actions[bot]"
git pull
- name: Unit Tests
run: npm test
env:
CI: true
- name: Run Prettier
id: run-prettier
run: |
npm run prettify
echo "::set-output name=changed-files::$(git status -s -uno | wc -l)"
- name: Commit Changes
if: steps.run-prettier.outputs.changed-files > 0
run: |
git add .
git commit -m "Release Ops" -a
- name: Increase Version
run: npm version patch
- name: Push Updates
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Package
run: npm run upload
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}