-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (64 loc) · 2.15 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Release
on:
workflow_run:
workflows: ["Run tests"]
branches: [main]
types:
- completed
concurrency: ${{ github.workflow }}-${{ github.ref }}
permissions:
pages: write # to deploy to Pages
id-token: write
jobs:
release:
name: Release
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v4
with:
# Fetch all commit history for generating the changelog.
fetch-depth: 0
# Avoid configuring the token with the local git config in favor of
# our own environment token (see below).
persist-credentials: false
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
with:
node-version-file: package.json
cache: "pnpm"
always-auth: 'true'
scope: '@plexinc'
registry-url: "https://registry.npmjs.org"
- run: pnpm install --frozen-lockfile
- name: Create release pull request or publish
id: changesets
uses: changesets/action@v1
with:
version: pnpm run ci:version
commit: "chore: Update versions"
title: "chore: Update versions"
publish: pnpm run ci:publish
env:
# When you use the repository's GITHUB_TOKEN to perform tasks, events
# triggered by the GITHUB_TOKEN will not create a new workflow run.
# This means that checks won't run on the release PRs. We work around
# this by using our own GH_TOKEN_REPO_ACCESS organization secret.
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_REPO_ACCESS }}
- name: Upload storybook static files as artifact
uses: actions/upload-pages-artifact@v3
with:
path: apps/storybook/dist/
deploy-pages:
needs: release
name: Deploy Docs to GitHub Pages
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4