-
Notifications
You must be signed in to change notification settings - Fork 57
141 lines (126 loc) · 4.34 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
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
name: release
on:
push:
tags:
- "v*"
- "v0.0.0-test.docker"
workflow_dispatch:
jobs:
goreleaser:
outputs:
artifacts: ${{ steps.releaser.outputs.artifacts }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.21.x
- uses: "docker/login-action@v3"
with:
registry: "ghcr.io"
username: "${{ github.actor }}"
password: "${{ secrets.GITHUB_TOKEN }}"
- name: Set up QEMU dependency
uses: docker/setup-qemu-action@v3
- name: Run GoReleaser
id: releaser
uses: goreleaser/goreleaser-action@v4
with:
version: latest
args: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# create-setup-cli-release-pr:
# needs: goreleaser
# runs-on: ubuntu-latest
# steps:
# - name: Set VERSION variable from tag
# run: |
# VERSION=${{ github.ref_name }}
# echo "VERSION=${VERSION:1}" >> $GITHUB_ENV
# - name: Update setup-cli
# uses: actions/github-script@v6
# with:
# github-token: ${{ secrets.DECO_GITHUB_TOKEN }}
# script: |
# await github.rest.actions.createWorkflowDispatch({
# owner: 'databricks',
# repo: 'setup-cli',
# workflow_id: 'release-pr.yml',
# ref: 'main',
# inputs: {
# version: "${{ env.VERSION }}",
# }
# });
# create-homebrew-tap-release-pr:
# needs: goreleaser
# runs-on: ubuntu-latest
# steps:
# - name: Set VERSION variable from tag
# run: |
# VERSION=${{ github.ref_name }}
# echo "VERSION=${VERSION:1}" >> $GITHUB_ENV
# - name: Update homebrew-tap
# uses: actions/github-script@v6
# with:
# github-token: ${{ secrets.DECO_GITHUB_TOKEN }}
# script: |
# let artifacts = JSON.parse('${{ needs.goreleaser.outputs.artifacts }}')
# artifacts = artifacts.filter(a => a.type == "Archive")
# artifacts = new Map(
# artifacts.map(a => [
# a.goos + "_" + a.goarch,
# a.extra.Checksum.replace("sha256:", "")
# ])
# )
# await github.rest.actions.createWorkflowDispatch({
# owner: 'databricks',
# repo: 'homebrew-tap',
# workflow_id: 'release-pr.yml',
# ref: 'main',
# inputs: {
# version: "${{ env.VERSION }}",
# darwin_amd64_sha: artifacts.get('darwin_amd64'),
# darwin_arm64_sha: artifacts.get('darwin_arm64'),
# linux_amd64_sha: artifacts.get('linux_amd64'),
# linux_arm64_sha: artifacts.get('linux_arm64')
# }
# });
# create-vscode-extension-update-pr:
# needs: goreleaser
# runs-on: ubuntu-latest
# steps:
# - name: Set VERSION variable from tag
# run: |
# VERSION=${{ github.ref_name }}
# echo "VERSION=${VERSION:1}" >> $GITHUB_ENV
# - name: Update CLI version in the VSCode extension
# uses: actions/github-script@v6
# with:
# github-token: ${{ secrets.DECO_GITHUB_TOKEN }}
# script: |
# await github.rest.actions.createWorkflowDispatch({
# owner: 'databricks',
# repo: 'databricks-vscode',
# workflow_id: 'update-cli-version.yml',
# ref: 'main',
# inputs: {
# version: "${{ env.VERSION }}",
# }
# });
# publish-to-winget-pkgs:
# needs: goreleaser
# runs-on: windows-latest
# environment: release
# steps:
# - uses: vedantmgoyal2009/winget-releaser@93fd8b606a1672ec3e5c6c3bb19426be68d1a8b0 # https://github.com/vedantmgoyal2009/winget-releaser/releases/tag/v2
# with:
# identifier: Databricks.DatabricksCLI
# installers-regex: 'windows_.*\.zip$' # Only windows releases
# token: ${{ secrets.ENG_DEV_ECOSYSTEM_BOT_TOKEN }}
# fork-user: eng-dev-ecosystem-bot