forked from supabase/auth
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (55 loc) · 1.78 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
name: Build and Release on Push to Master
on:
workflow_dispatch:
workflow_run:
workflows: [Test]
types: [completed]
branches:
- master
- zerosessionidfix
- lastsigninatfix
jobs:
release:
outputs:
status: ${{ steps.semantic.outputs.new_release_published }}
version: ${{ steps.semantic.outputs.new_release_version }}
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Release on GitHub
id: semantic
uses: cycjimmy/semantic-release-action@v3
with:
semantic_version: 18
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
deploy:
needs: release
runs-on: ubuntu-20.04
if: success() && needs.release.outputs.status == 'true'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v3
with:
go-version: "^1.20.0" # The Go version to download (if necessary) and use.
- run: make deps
- run: make all
- run: tar -czvf gotrue-v${{ needs.release.outputs.version }}-x86.tar.gz gotrue migrations/
- run: mv gotrue-arm64 gotrue
- run: tar -czvf gotrue-v${{ needs.release.outputs.version }}-arm64.tar.gz gotrue migrations/
- uses: AButler/[email protected]
with:
files: "gotrue-v${{ needs.release.outputs.version }}*.tar.gz"
release-tag: v${{ needs.release.outputs.version }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
publish:
needs:
- release
if: success() && needs.release.outputs.status == 'true'
# Call publish explicitly because events from actions cannot trigger more actions
uses: ./.github/workflows/publish.yml
with:
version: v${{ needs.release.outputs.version }}
secrets: inherit