2020-08-23 02:17:36 -05:00
|
|
|
name: Changesets
|
2020-08-23 02:13:36 -05:00
|
|
|
|
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
- cron: '0 0 * * *'
|
|
|
|
|
|
|
|
push:
|
|
|
|
branches:
|
2021-04-10 04:55:38 -05:00
|
|
|
- master
|
2020-08-23 02:13:36 -05:00
|
|
|
|
|
|
|
env:
|
|
|
|
CI: true
|
2020-08-23 02:15:41 -05:00
|
|
|
PNPM_CACHE_FOLDER: .pnpm-store
|
2020-08-23 02:13:36 -05:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
# Update package versions from changesets.
|
|
|
|
version:
|
2021-04-03 14:04:31 -05:00
|
|
|
timeout-minutes: 14
|
2020-09-01 14:22:36 -05:00
|
|
|
runs-on: ubuntu-latest
|
2021-04-10 04:55:38 -05:00
|
|
|
if: github.ref == 'refs/heads/master' && github.repository == 'verdaccio/verdaccio'
|
2020-08-23 02:13:36 -05:00
|
|
|
steps:
|
|
|
|
- name: checkout code repository
|
2022-08-22 10:58:45 -05:00
|
|
|
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
|
2020-08-23 02:13:36 -05:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: setup node.js
|
2022-08-22 10:58:45 -05:00
|
|
|
uses: actions/setup-node@2fddd8803e2f5c9604345a0b591c3020ee971a93 # tag=v3
|
2020-08-23 02:13:36 -05:00
|
|
|
with:
|
2021-04-03 14:04:31 -05:00
|
|
|
node-version: 14
|
2021-09-03 15:17:22 -05:00
|
|
|
registry-url: 'https://registry.npmjs.org'
|
2021-04-04 01:06:50 -05:00
|
|
|
env:
|
2021-09-03 15:17:22 -05:00
|
|
|
NODE_AUTH_TOKEN: ${{ secrets.REGISTRY_AUTH_TOKEN }}
|
2020-08-23 02:13:36 -05:00
|
|
|
|
2020-08-23 02:15:41 -05:00
|
|
|
- name: install pnpm
|
2022-05-19 15:08:32 -05:00
|
|
|
run: npm i pnpm@6.32.15 -g
|
2021-01-10 15:04:09 -05:00
|
|
|
env:
|
2021-09-03 15:17:22 -05:00
|
|
|
NODE_AUTH_TOKEN: ${{ secrets.REGISTRY_AUTH_TOKEN }}
|
2020-08-23 02:15:41 -05:00
|
|
|
|
2020-08-23 02:17:36 -05:00
|
|
|
- name: setup pnpm config
|
|
|
|
run: pnpm config set store-dir $PNPM_CACHE_FOLDER
|
2021-01-10 15:04:09 -05:00
|
|
|
- name: setup pnpm config registry
|
2021-09-03 15:17:22 -05:00
|
|
|
run: pnpm config set registry https://registry.npmjs.org
|
2020-08-23 02:17:36 -05:00
|
|
|
|
|
|
|
- name: install dependencies
|
|
|
|
run: pnpm install
|
2021-01-10 15:04:09 -05:00
|
|
|
env:
|
2021-09-03 15:17:22 -05:00
|
|
|
NODE_AUTH_TOKEN: ${{ secrets.REGISTRY_AUTH_TOKEN }}
|
2021-10-03 07:04:24 -05:00
|
|
|
- name: crowdin download
|
|
|
|
env:
|
|
|
|
CROWDIN_VERDACCIO_PROJECT_ID: ${{ secrets.CROWDIN_VERDACCIO_PROJECT_ID }}
|
|
|
|
CROWDIN_VERDACCIO_API_KEY: ${{ secrets.CROWDIN_VERDACCIO_API_KEY }}
|
|
|
|
CONTEXT: production
|
|
|
|
run: pnpm crowdin:download
|
2021-01-10 13:05:21 -05:00
|
|
|
- name: build
|
|
|
|
run: pnpm build
|
|
|
|
|
2020-08-23 02:13:36 -05:00
|
|
|
- name: create versions
|
2022-09-04 04:42:46 -05:00
|
|
|
uses: changesets/action@master
|
2020-08-23 02:13:36 -05:00
|
|
|
with:
|
|
|
|
version: pnpm ci:version
|
|
|
|
commit: 'chore: update versions'
|
|
|
|
title: 'chore: update versions'
|
2021-01-10 13:05:21 -05:00
|
|
|
publish: pnpm ci:publish
|
2020-08-23 02:13:36 -05:00
|
|
|
env:
|
2022-09-04 04:42:46 -05:00
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2021-09-03 15:17:22 -05:00
|
|
|
NPM_TOKEN: ${{ secrets.REGISTRY_AUTH_TOKEN }}
|
|
|
|
NODE_AUTH_TOKEN: ${{ secrets.REGISTRY_AUTH_TOKEN }}
|
2021-09-03 16:19:27 -05:00
|
|
|
NPM_CONFIG_REGISTRY: https://registry.npmjs.org
|