-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (56 loc) · 1.7 KB
/
create-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
name: Create Release
on:
schedule:
- cron: "0 10 * * 1-4"
workflow_dispatch:
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:
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: Create release pull request
id: changesets
uses: changesets/[email protected]
with:
title: Release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Publish Release
if: steps.changesets.outputs.hasChangesets == 'false'
run: node .ops/publish.mjs
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}