forked from cli/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (84 loc) · 2.48 KB
/
releases.yml
File metadata and controls
86 lines (84 loc) · 2.48 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
name: goreleaser
on:
push:
tags:
- "v*"
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Set up Go 1.13
id: go
uses: actions/setup-go@v1
with:
go-version: 1.13
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v1
with:
version: latest
args: release
env:
GH_OAUTH_CLIENT_ID: 178c6fc778ccc68e1d6a
GH_OAUTH_CLIENT_SECRET: ${{secrets.OAUTH_CLIENT_SECRET}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
msi:
needs: goreleaser
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Set up Go 1.13
id: go
uses: actions/setup-go@v1
with:
go-version: 1.13
- name: Download gh.exe
uses: ./.github/actions/download-exe
id: download_exe
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Install go-msi
run: choco install -y "go-msi"
- name: Build MSI
id: buildmsi
uses: ./.github/actions/build-msi
with:
exe: ${{ steps.download_exe.outputs.exe }}
- name: Obtain signing cert
env:
DESKTOP_CERT_TOKEN: ${{ secrets.DESKTOP_CERT_TOKEN }}
run: .\setup-windows-certificate.ps1
shell: powershell
- name: Sign MSI
env:
GITHUB_CERT_PASSWORD: ${{ secrets.GITHUB_CERT_PASSWORD }}
run: .\sign.ps1 -Certificate "windows-certificate.pfx" -Executable "${{ steps.buildmsi.outputs.msi }}"
- name: Upload MSI
uses: ./.github/actions/upload-msi
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
releases:
needs: msi
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Copy release
id: copy
uses: ./.github/actions/copy-release-to-another-repo
with:
target-repo: github/homebrew-gh
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
UPLOAD_GITHUB_TOKEN: ${{secrets.UPLOAD_GITHUB_TOKEN}}
- name: Bump brew formula
if: "!contains(github.ref, '-')" # skip prereleases
uses: mislav/bump-homebrew-formula-action@v1.4
with:
formula-name: gh
homebrew-tap: github/homebrew-gh
download-url: ${{ steps.copy.outputs.asset-url }}
env:
COMMITTER_TOKEN: ${{ secrets.UPLOAD_GITHUB_TOKEN }}