ardiffact/.github/workflows/release.yml

55 строки
1.5 KiB
YAML
Исходник Постоянная ссылка Обычный вид История

2021-02-19 03:50:54 +03:00
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
on:
push:
branches:
- main
permissions:
contents: write
2021-02-19 03:50:54 +03:00
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
2021-02-19 03:50:54 +03:00
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
2023-04-28 18:11:13 +03:00
- name: Checkout
uses: actions/checkout@v3
2021-02-19 03:50:54 +03:00
- name: Use Node.js ${{ matrix.node-version }}
2023-04-28 18:11:13 +03:00
uses: actions/setup-node@v3
2021-02-19 03:50:54 +03:00
with:
node-version: ${{ matrix.node-version }}
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
2023-04-28 18:11:13 +03:00
- uses: actions/cache@v3
2021-02-19 03:50:54 +03:00
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn install
- run: yarn lage build test
- name: Set git user config
run: |
git config user.name github-actions
git config user.email github-actions@github.com
- name: Publish packages
run: yarn beachball publish -y -n $NPM_TOKEN
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}