docusaurus/.github/workflows/canary-release.yml
dependabot[bot] 7bf535d7c7
chore(deps): bump actions/setup-node from 3.2.0 to 3.3.0 (#7578)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](17f8bd9264...eeb10cff27)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-07 09:14:01 +08:00

46 lines
1.2 KiB
YAML

name: Canary Release
on:
push:
branches:
- main
paths:
- packages/**
permissions:
contents: read
jobs:
publish-canary:
name: Publish Canary
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3
with:
fetch-depth: 0 # Needed to get the commit number with "git rev-list --count HEAD"
- name: Set up Node
uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3
with:
node-version: '16'
cache: yarn
- name: Prepare git
run: |
git config --global user.name "Docusaurus Canary"
git config --global user.email "canary@docusaurus.io"
git fetch
git checkout main
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> .npmrc
cat .npmrc
echo "npm whoami"
npm whoami
env:
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
- name: Installation
run: yarn
- name: Publish Canary release
run: |
yarn canary
env:
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}