-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (49 loc) · 1.49 KB
/
release-publish.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
name: Publish Release
on:
push:
branches:
- main
env:
PNPM_CACHE_PATH: ~/.pnpm-store
PNPM_CACHE_NAME: pnpm-store-cache
VITE_PUBLIC_SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
VITE_PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY }}
REDIS_PASSWORD: ${{ secrets.REDIS_PASSWORD }}
REDIS_ENDPOINT_URI: ${{ secrets.REDIS_ENDPOINT_URI }}
FOOTBALL_DATA_API_KEY: ${{ secrets.FOOTBALL_DATA_API_KEY }}
jobs:
release:
if: ${{ startsWith(github.event.head_commit.message, 'changeset-release/') }}
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@master
with:
fetch-depth: 0
persist-credentials: false
- name: Get branch name
id: branch
run: |
echo "branch_name=$(echo ${GITHUB_REF#refs/heads/} | tr / -)" >> $GITHUB_ENV
- name: Get node version
id: nvmrc
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc)
- name: Setup PNPM
uses: pnpm/action-setup@v2
with:
version: 8
- name: Setup Node
uses: actions/setup-node@v3
with:
always-auth: true
node-version-file: ".nvmrc"
registry-url: https://registry.npmjs.org
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Publish Release
run: node .ops/publish.mjs
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}