Advertisement
mbruns

Git Action Build Automation

Jun 11th, 2022
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.88 KB | None | 0 0
  1. //YAML Workflow Github Action Script to run a production build as soon as a commit is made.
  2. name: Release
  3.  
  4. on:
  5.   push:
  6.     branches: [main]
  7.  
  8. jobs:
  9.   release:
  10.     name: Release
  11.     runs-on: ubuntu-latest
  12.  
  13.     steps:
  14.       - name: Checkout
  15.         uses: actions/checkout@v2
  16.  
  17.       - name: Setup Node.js
  18.         uses: actions/setup-node@v2
  19.         with:
  20.           node-version: 16.x
  21.  
  22.       - name: Install dependencies
  23.         run: yarn install --frozen-lockfile
  24.  
  25.       - name: Install semantic-release extra plugins
  26.         run: yarn add -D @semantic-release/changelog @semantic-release/git
  27.  
  28.       # - name: Lint
  29.       #   run: npm run lint-fix
  30.  
  31.       - name: Test
  32.         run: yarn test
  33.  
  34.       - name: Build
  35.         run: yarn build
  36.  
  37.       - name: Release
  38.         env:
  39.           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  40.           NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
  41.         run: npx semantic-release
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement