forked from git-lfs/git-lfs
-
Notifications
You must be signed in to change notification settings - Fork 0
123 lines (122 loc) · 3.96 KB
/
release.yml
File metadata and controls
123 lines (122 loc) · 3.96 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
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
name: Release
on:
push:
tags: '*'
jobs:
build-windows:
name: Build Windows Assets
runs-on: windows-latest
strategy:
matrix:
go: ['1.16.x']
steps:
- uses: actions/checkout@v1
- uses: actions/setup-ruby@v1
- uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- run: mkdir -p "$HOME/go/bin"
shell: bash
- run: set GOPATH=%HOME%\go
- run: cinst InnoSetup -y
- run: cinst strawberryperl -y
- run: cinst zip -y
- run: cinst jq -y
- run: cinst windows-sdk-10.0 -y
- run: gem install ronn
- run: refreshenv
- run: GOPATH="$HOME/go" PATH="$HOME/go/bin:$PATH" go get github.com/josephspurrier/goversioninfo/cmd/goversioninfo
shell: bash
- run: mkdir -p bin/releases
shell: bash
- run: CERT_FILE="$HOME/cert.pfx" make release-write-certificate
shell: bash
env:
CERT_CONTENTS: ${{secrets.WINDOWS_CERT_BASE64}}
- run: PATH="$HOME/go/bin:$PATH" make bin/releases/git-lfs-windows-amd64-$(git describe).zip
shell: bash
- run: PATH="$HOME/go/bin:$PATH" make bin/releases/git-lfs-windows-386-$(git describe).zip
shell: bash
- run: PATH="$HOME/go/bin:/c/Program Files (x86)/Windows Kits/10/bin/x86:$PATH" CERT_FILE="$HOME/cert.pfx" make release-windows
shell: bash
env:
CERT_PASS: ${{secrets.WINDOWS_CERT_PASS}}
- run: make release-windows-rebuild
shell: bash
- uses: actions/upload-artifact@v1
with:
name: windows-assets
path: bin/releases
build-macos:
name: Build macOS Assets
runs-on: macos-latest
strategy:
matrix:
go: ['1.16.x']
steps:
- uses: actions/checkout@v1
- uses: actions/setup-ruby@v1
- uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- run: brew install mitchellh/gon/gon
- run: gem install ronn
- run: make release
- run: CERT_FILE="$HOME/cert.p12" make release-write-certificate
env:
CERT_CONTENTS: ${{secrets.MACOS_CERT_BASE64}}
- run: CERT_FILE="$HOME/cert.p12" make release-import-certificate
env:
CERT_PASS: ${{secrets.MACOS_CERT_PASS}}
- run: make release-darwin
env:
DARWIN_DEV_USER: ${{secrets.MACOS_DEV_USER}}
DARWIN_DEV_PASS: ${{secrets.MACOS_DEV_PASS}}
DARWIN_CERT_ID: ${{secrets.MACOS_CERT_ID}}
- uses: actions/upload-artifact@v1
with:
name: macos-assets
path: bin/releases
build-main:
name: Main Release Assets
needs:
- build-windows
- build-macos
runs-on: ubuntu-20.04
strategy:
matrix:
go: ['1.16.x']
steps:
- uses: actions/checkout@v1
- uses: actions/setup-ruby@v1
- uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- uses: actions/download-artifact@v1
with:
name: windows-assets
- uses: actions/download-artifact@v1
with:
name: macos-assets
- run: gem install ronn
- run: CGO_ENABLED=0 make release
- run: rm -f bin/releases/*windows* bin/releases/*darwin*
- run: 'find windows-assets -name "*windows*" -type f | xargs -L1 -I{} mv {} bin/releases'
- run: 'find macos-assets -name "*darwin*" -type f | xargs -L1 -I{} mv {} bin/releases'
- run: script/upload --skip-verify $(git describe)
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
build-docker:
name: Build Linux Packages
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- uses: actions/setup-ruby@v1
- run: gem install packagecloud-ruby
- run: git clone https://github.com/git-lfs/build-dockers.git "$HOME/build-dockers"
- run: (cd "$HOME/build-dockers" && ./build_dockers.bsh)
- run: DOCKER_AUTOPULL=0 ./docker/run_dockers.bsh --prune
# If this is a pre-release tag, don't upload anything to packagecloud.
- run: '[ -z "${GITHUB_REF%%refs/tags/*-pre*}" ] || ./script/packagecloud.rb'
env:
PACKAGECLOUD_TOKEN: ${{secrets.PACKAGECLOUD_TOKEN}}