-
-
Notifications
You must be signed in to change notification settings - Fork 168
53 lines (42 loc) · 1.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
name: Release
on:
push:
branches:
- master
- next
- rc
workflow_dispatch:
jobs:
release:
name: Release / Node ${{ matrix.node }}
strategy:
matrix:
node: ['18']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- run: |
npm ci
npm run build
- name: Create a release for @supabase/auth-js
run: npx semantic-release -r 'https://github.com/supabase/gotrue-js.git'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish @supabase/gotrue-js
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
if [ "0.0.0" -neq $(jq -r '.version' package.json) ]
then
echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' > ~/.npmrc
for f in package.json package-lock.json
do
sed -i 's|\(["/]\)auth-js|\1gotrue-js|g' "$f"
done
npm publish --tag latest
fi