2020-08-23 09:17:36 +02:00
|
|
|
name: Changesets
|
2020-08-23 09:13:36 +02:00
|
|
|
|
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
- cron: '0 0 * * *'
|
|
|
|
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- 5.x
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- 5.
|
|
|
|
|
|
|
|
env:
|
|
|
|
CI: true
|
2020-08-23 09:15:41 +02:00
|
|
|
PNPM_CACHE_FOLDER: .pnpm-store
|
2020-08-23 09:13:36 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
# Update package versions from changesets.
|
|
|
|
version:
|
|
|
|
timeout-minutes: 15
|
2020-09-01 21:22:36 +02:00
|
|
|
runs-on: ubuntu-latest
|
2020-08-23 09:13:36 +02:00
|
|
|
if: github.ref == 'refs/heads/5.x' && github.repository == 'verdaccio/verdaccio'
|
|
|
|
steps:
|
|
|
|
- name: checkout code repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: setup node.js
|
2021-01-10 20:49:17 +01:00
|
|
|
uses: actions/setup-node@v2
|
2020-08-23 09:13:36 +02:00
|
|
|
with:
|
2021-01-10 21:04:09 +01:00
|
|
|
node-version: 15
|
|
|
|
registry-url: 'https://registry.verdaccio.org'
|
2020-08-23 09:13:36 +02:00
|
|
|
|
2020-08-23 09:15:41 +02:00
|
|
|
- name: install pnpm
|
2020-11-15 12:18:56 +01:00
|
|
|
run: npm i pnpm@latest -g
|
2021-01-10 21:04:09 +01:00
|
|
|
env:
|
|
|
|
NODE_AUTH_TOKEN: ${{ secrets.VERDACCIO_TOKEN }}
|
2020-08-23 09:15:41 +02:00
|
|
|
|
2020-08-23 09:17:36 +02:00
|
|
|
- name: setup pnpm config
|
|
|
|
run: pnpm config set store-dir $PNPM_CACHE_FOLDER
|
2021-01-10 21:04:09 +01:00
|
|
|
- name: setup pnpm config registry
|
|
|
|
run: pnpm config set registry https://registry.verdaccio.org
|
2020-08-23 09:17:36 +02:00
|
|
|
|
|
|
|
- name: install dependencies
|
|
|
|
run: pnpm install
|
2021-01-10 21:04:09 +01:00
|
|
|
env:
|
|
|
|
NODE_AUTH_TOKEN: ${{ secrets.VERDACCIO_TOKEN }}
|
2020-08-23 09:17:36 +02:00
|
|
|
|
2021-01-10 19:05:21 +01:00
|
|
|
- name: build
|
|
|
|
run: pnpm build
|
|
|
|
|
2020-08-23 09:13:36 +02:00
|
|
|
- name: create versions
|
|
|
|
uses: changesets/action@master
|
|
|
|
with:
|
|
|
|
version: pnpm ci:version
|
|
|
|
commit: 'chore: update versions'
|
|
|
|
title: 'chore: update versions'
|
2021-01-10 19:05:21 +01:00
|
|
|
publish: pnpm ci:publish
|
2020-08-23 09:13:36 +02:00
|
|
|
env:
|
2020-08-23 09:15:41 +02:00
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2021-01-10 19:05:21 +01:00
|
|
|
NPM_TOKEN: ${{ secrets.VERDACCIO_TOKEN }}
|
2021-01-10 20:40:45 +01:00
|
|
|
NODE_AUTH_TOKEN: ${{ secrets.VERDACCIO_TOKEN }}
|