-
Notifications
You must be signed in to change notification settings - Fork 28
50 lines (40 loc) · 1.15 KB
/
pr.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
name: PR workflow
on:
pull_request:
branches: [main]
permissions:
contents: write
env:
BEFORE_SHA: ${{ github.event.before }}
CI: true
POSTHOG_API_TOKEN: ${{ secrets.POSTHOG_API_TOKEN }}
jobs:
build:
if: github.event.commits[0].author.name != 'github-actions[bot]'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
token: ${{ secrets.BUILD_TOKEN }}
- uses: actions/setup-go@v5
with:
go-version: '1.21'
check-latest: true
- run: go mod vendor
- name: Test
run: go test -v
env:
VERSION: ${{ env.GITHUB_REF_NAME }}
TOKEN: ${{ secrets.AAI_TEST_TOKEN }}
- name: install GoReleaser
uses: goreleaser/goreleaser-action@v3
with:
install-only: true
- name: goreleaser
run: goreleaser release --skip-publish --skip-validate
env:
version: ${{ env.GITHUB_REF_NAME }}
GITHUB_TOKEN: ${{ secrets.BUILD_TOKEN }}
POSTHOG_API_TOKEN: ${{ secrets.POSTHOG_API_TOKEN }}
SENTRY_DNS: ${{ secrets.SENTRY_DNS }}