-
Notifications
You must be signed in to change notification settings - Fork 42
96 lines (94 loc) · 3.7 KB
/
Copy pathrelease.yaml
File metadata and controls
96 lines (94 loc) · 3.7 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
---
name: "Release for Docker and MacOS"
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
workflow_dispatch:
inputs:
tag:
description: "Existing tag to release (e.g. v1.2.3)"
required: true
type: "string"
jobs:
github:
runs-on: "macos-latest"
steps:
- uses: "actions/checkout@v6"
with:
fetch-depth: 0
ref: "${{ inputs.tag || github.ref }}"
- name: "Install cross-compilers"
run: |
brew tap messense/macos-cross-toolchains
brew trust messense/macos-cross-toolchains
brew install x86_64-unknown-linux-gnu x86_64-unknown-linux-musl aarch64-unknown-linux-gnu aarch64-unknown-linux-musl mingw-w64
echo "SDKROOT=$(xcrun --sdk macosx --show-sdk-path)" >> $GITHUB_ENV
- uses: "authzed/actions/setup-go@main"
- uses: "goreleaser/goreleaser-action@v7"
with:
distribution: "goreleaser-pro"
# NOTE: keep in sync with goreleaser version in other job.
# github actions don't allow yaml anchors.
version: "v2.12.5"
args: "release --clean"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
HOMEBREW_TAP_GITHUB_TOKEN: "${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}"
GORELEASER_KEY: "${{ secrets.GORELEASER_KEY }}"
GEMFURY_PUSH_TOKEN: "${{ secrets.GEMFURY_PUSH_TOKEN }}"
- name: "Notify in Slack if failure"
if: "${{ failure() }}"
uses: "slackapi/slack-github-action@af78098f536edbc4de71162a307590698245be95" # v3.0.1
with:
webhook: "${{ secrets.SLACK_BUILDS_WEBHOOK_URL }}"
webhook-type: "incoming-webhook"
payload: |
text: "Release failure."
blocks:
- type: "section"
text:
type: "mrkdwn"
text: |
:x: @eng-oss Release failure. Please take a look.
*Repository:* <${{ github.server_url }}/${{ github.repository }}|${{ github.repository }}>
docker:
runs-on: "depot-ubuntu-latest-arm"
steps:
- uses: "actions/checkout@v6"
with:
fetch-depth: 0
ref: "${{ inputs.tag || github.ref }}"
- uses: "authzed/actions/docker-login@main"
with:
quayio_token: "${{ secrets.QUAYIO_PASSWORD }}"
github_token: "${{ secrets.GITHUB_TOKEN }}"
dockerhub_token: "${{ secrets.DOCKERHUB_ACCESS_TOKEN }}"
- name: "Install linux cross-compilers"
run: "sudo apt-get update && sudo apt-get install -y gcc-aarch64-linux-gnu gcc-mingw-w64-x86-64"
- uses: "authzed/actions/setup-go@main"
- uses: "goreleaser/goreleaser-action@v7"
with:
distribution: "goreleaser-pro"
# NOTE: keep in sync with goreleaser version in other job.
# github actions don't allow yaml anchors.
version: "v2.12.5"
args: "release --config=.goreleaser.docker.yml --clean"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
GORELEASER_KEY: "${{ secrets.GORELEASER_KEY }}"
- name: "Notify in Slack if failure"
if: "${{ failure() }}"
uses: "slackapi/slack-github-action@af78098f536edbc4de71162a307590698245be95" # v3.0.1
with:
webhook: "${{ secrets.SLACK_BUILDS_WEBHOOK_URL }}"
webhook-type: "incoming-webhook"
payload: |
text: "Release failure."
blocks:
- type: "section"
text:
type: "mrkdwn"
text: |
:x: @eng-oss Release failure. Please take a look.
*Repository:* <${{ github.server_url }}/${{ github.repository }}|${{ github.repository }}>