forked from pocketbase/pocketbase
-
Notifications
You must be signed in to change notification settings - Fork 0
108 lines (96 loc) · 3.84 KB
/
release.yaml
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: basebuild
on:
pull_request:
push:
# workflow_dispatch:
# inputs:
# runs_on:
# description: "Runs on value"
# required: true
# default: "warp-ubuntu-latest-x64-8x"
jobs:
goreleaser:
runs-on: ${{ matrix.runners }}
strategy:
fail-fast: true
# max-parallel: 1
matrix:
runners:
# - "warpdev-ubuntu-2404-x64-2x;wb.snapshot.key=wb-pocketbase-snp-bm-0"
# - "warpdev-ubuntu-2404-x64-4x;wb.snapshot.key=wb-pocketbase-snp-bm-0"
# - "warpdev-ubuntu-2404-x64-8x;wb.snapshot.key=wb-pocketbase-snp-bm-0"
# - "warpdev-ubuntu-2404-x64-16x;wb.snapshot.key=wb-pocketbase-snp-bm-0"
# - "warpdev-ubuntu-2404-x64-32x;wb.snapshot.key=wb-pocketbase-snp-bm-0"
- "warp-ubuntu-2404-x64-2x"
# - "warpdev-ubuntu-latest-arm64-2x"
# - "warpdev-ubuntu-2404-x64-2x-spot"
# - "warpdev-ubuntu-latest-arm64-2x-spot"
# - "warpdev-custom-validteststack-staticip-ondemand"
# - "warpdev-ubuntu-2404-x64-4x"
# - "warpdev-ubuntu-2404-x64-8x"
# - "warpdev-ubuntu-2404-x64-16x"
# - "warpdev-ubuntu-2404-x64-32x"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Log GitHub context
uses: actions/github-script@v7
with:
script: |
console.log('GitHub context:', context);
core.debug('Full GitHub context object:');
core.debug(JSON.stringify(context, null, 2));
- name: Set up Node.js
uses: WarpBuilds/setup-node@v4
with:
node-version: 20.11.0
- name: Ensure GCC is installed
run: |
if ! command -v gcc &> /dev/null
then
echo "GCC could not be found, installing..."
sudo apt-get update
sudo apt-get install -y gcc
else
echo "GCC is already installed"
fi
- name: Set up Go
uses: WarpBuilds/setup-go@v5
with:
go-version: '>=1.22.5'
# This step usually is not needed because the /ui/dist is pregenerated locally
# but its here to ensure that each release embeds the latest admin ui artifacts.
# If the artificats differs, a "dirty error" is thrown - https://goreleaser.com/errors/dirty/
# - name: Build Admin dashboard UI
# run: npm --prefix=./ui ci && npm --prefix=./ui run build
# Temporary disable as the types can have random generated identifiers making it non-deterministic.
#
# # Similar to the above, the jsvm types are pregenerated locally
# # but its here to ensure that it wasn't forgotten to be executed.
# - name: Generate jsvm types
# run: go run ./plugins/jsvm/internal/types/types.go
# The prebuilt golangci-lint doesn't support go 1.18+ yet
# https://github.com/golangci/golangci-lint/issues/2649
# - name: Run linter
# uses: golangci/golangci-lint-action@v3
# - name: Run tests
# run: go test ./...
# - name: Run GoReleaser
# uses: goreleaser/goreleaser-action@v3
# with:
# distribution: goreleaser
# version: latest
# args: release --clean
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create snapshot
if: github.event_name == 'push'
uses: WarpBuilds/snapshot-save@v1
with:
warpbuild-base-url: "https://api.warpbuild.com/api/v1"
# warpbuild-base-url: "https://6c16-49-207-54-232.ngrok-free.app/api/v1"
wait-timeout-minutes: 30
fail-on-error: "false"
alias: "pocketbase-snp-${{ contains(matrix.runners, 'arm') && 'arm' || 'x64' }}-${{ contains(matrix.runners, 'custom') && 'custom' || contains(matrix.runners, 'spot') && 'spot' || 'ondemand' }}-1"