-
Notifications
You must be signed in to change notification settings - Fork 79
77 lines (65 loc) · 1.92 KB
/
release.yml
File metadata and controls
77 lines (65 loc) · 1.92 KB
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
name: release
on:
workflow_dispatch:
inputs:
tag:
description: "New tag name"
required: true
push:
tags:
- "*"
permissions:
contents: write
packages: write
issues: write
id-token: write
jobs:
goreleaser:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Create and push tag
if: github.event.inputs.tag
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git tag ${{ github.event.inputs.tag }}
git push origin ${{ github.event.inputs.tag }}
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
cache-dependency-path: ui/pnpm-lock.yaml
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ">=1.21.3"
- name: Build UI Dashboard
run: pnpm --dir=./ui install && pnpm --dir=./ui build
- name: Tidy modules
run: go mod tidy
- name: Run tests
run: go test ./...
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Run GoReleaser with goreleaser-cross
run: |
docker run --rm --privileged \
-v ${{ github.workspace }}:/go/src/github.com/kevinanielsen/go-fast-cdn \
-v /var/run/docker.sock:/var/run/docker.sock \
-w /go/src/github.com/kevinanielsen/go-fast-cdn \
-e GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} \
-e CGO_ENABLED=1 \
goreleaser/goreleaser-cross:v1.27.0 \
release --clean