4
4
pull_request :
5
5
push :
6
6
branches :
7
- - master
8
- - stable
9
- - rc/**
7
+ - master
8
+ - stable
9
+ - rc/**
10
10
tags :
11
- - ' **'
11
+ - ' **'
12
12
schedule :
13
13
- cron : " 0 0 * * *"
14
14
workflow_dispatch :
@@ -31,152 +31,152 @@ jobs:
31
31
release-args : " "
32
32
cache-bust : " 1"
33
33
steps :
34
- - name : Clone project
35
- uses : actions/checkout@v2
36
- - name : Cache dependencies on Unix-like OS
37
- if : startsWith(runner.os, 'Linux') || startsWith(runner.os, 'macOS')
38
- uses : actions/cache@v3
39
- with :
40
- path : ~/.stack
41
- key : ${{ runner.os }}-${{ hashFiles('stack.yaml') }}${{ matrix.cache-bust }}
42
- - name : Cache dependencies on Windows
43
- if : startsWith(runner.os, 'Windows')
44
- uses : actions/cache@v3
45
- with :
46
- path : |
47
- ~\AppData\Roaming\stack
48
- ~\AppData\Local\Programs\stack
49
- key : ${{ runner.os }}-${{ hashFiles('stack.yaml') }}${{ matrix.cache-bust }}
50
- - shell : bash
51
- name : Install deps and run checks
52
- run : |
53
- set -ex
34
+ - name : Clone project
35
+ uses : actions/checkout@v2
36
+ - name : Cache dependencies on Unix-like OS
37
+ if : startsWith(runner.os, 'Linux') || startsWith(runner.os, 'macOS')
38
+ uses : actions/cache@v3
39
+ with :
40
+ path : ~/.stack
41
+ key : ${{ runner.os }}-${{ hashFiles('stack.yaml') }}${{ matrix.cache-bust }}
42
+ - name : Cache dependencies on Windows
43
+ if : startsWith(runner.os, 'Windows')
44
+ uses : actions/cache@v3
45
+ with :
46
+ path : |
47
+ ~\AppData\Roaming\stack
48
+ ~\AppData\Local\Programs\stack
49
+ key : ${{ runner.os }}-${{ hashFiles('stack.yaml') }}${{ matrix.cache-bust }}
50
+ - shell : bash
51
+ name : Install deps and run checks
52
+ run : |
53
+ set -ex
54
54
55
- # Work around 'git status' always showing symlinks modified on Windows; see
56
- # https://github.com/git-for-windows/git/issues/2653#issuecomment-640234081
57
- git config --global core.fscache false
55
+ # Work around 'git status' always showing symlinks modified on Windows; see
56
+ # https://github.com/git-for-windows/git/issues/2653#issuecomment-640234081
57
+ git config --global core.fscache false
58
58
59
- stack upgrade || curl -sSL https://get.haskellstack.org/ | sh -s - -f
59
+ stack upgrade || curl -sSL https://get.haskellstack.org/ | sh -s - -f
60
60
61
- if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]
62
- then
63
- # Retry installing nix due to nondeterministic error
64
- # Fatal error: glibc detected an invalid stdio handle
65
- # See:
66
- # https://github.com/nh2/static-haskell-nix/pull/27#issuecomment-502652181
67
- # https://github.com/NixOS/nix/issues/2733
68
- (for i in {1..5}; do bash <(curl -sSL https://nixos.org/nix/install) && exit 0; done; exit 1)
69
- . ~/.nix-profile/etc/profile.d/nix.sh
70
- nix-channel --add https://nixos.org/channels/nixos-19.09 nixpkgs
71
- nix-channel --update # Get GHC 8.2.2
72
- elif [[ "${{ matrix.os }}" == "windows-latest" ]]
73
- then
74
- choco install nsis-unicode -y
75
- fi
61
+ if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]
62
+ then
63
+ # Retry installing nix due to nondeterministic error
64
+ # Fatal error: glibc detected an invalid stdio handle
65
+ # See:
66
+ # https://github.com/nh2/static-haskell-nix/pull/27#issuecomment-502652181
67
+ # https://github.com/NixOS/nix/issues/2733
68
+ (for i in {1..5}; do bash <(curl -sSL https://nixos.org/nix/install) && exit 0; done; exit 1)
69
+ . ~/.nix-profile/etc/profile.d/nix.sh
70
+ nix-channel --add https://nixos.org/channels/nixos-19.09 nixpkgs
71
+ nix-channel --update # Get GHC 8.2.2
72
+ elif [[ "${{ matrix.os }}" == "windows-latest" ]]
73
+ then
74
+ choco install nsis-unicode -y
75
+ fi
76
76
77
- # Do this in the same step as installing deps to get relevant env var modifications
78
- stack etc/scripts/release.hs check ${{ matrix.release-args }}
77
+ # Do this in the same step as installing deps to get relevant env var modifications
78
+ stack etc/scripts/release.hs check ${{ matrix.release-args }}
79
79
80
- set +ex
80
+ set +ex
81
81
82
- - shell : bash
83
- name : Build bindist
84
- run : stack etc/scripts/release.hs build ${{ matrix.release-args }}
82
+ - name : Build bindist
83
+ shell : bash
84
+ run : stack etc/scripts/release.hs build ${{ matrix.release-args }}
85
85
86
- - name : Upload bindist
87
- uses : actions/upload-artifact@v2
88
- with :
89
- name : ${{ runner.os }}
90
- path : _release/stack-*
86
+ - name : Upload bindist
87
+ uses : actions/upload-artifact@v2
88
+ with :
89
+ name : ${{ runner.os }}
90
+ path : _release/stack-*
91
91
92
92
github-release :
93
93
name : Create Github release
94
94
needs : integration-tests
95
95
runs-on : ubuntu-latest
96
96
if : startsWith(github.ref, 'refs/tags/')
97
97
steps :
98
- - name : Download Linux artifact
99
- uses : actions/download-artifact@v2
100
- with :
101
- name : Linux
102
- path : _release
103
- - name : Download macOS artifact
104
- uses : actions/download-artifact@v2
105
- with :
106
- name : macOS
107
- path : _release
108
- - name : Download Windows artifact
109
- uses : actions/download-artifact@v2
110
- with :
111
- name : Windows
112
- path : _release
113
- - shell : bash
114
- name : Hash and sign assets
115
- env :
116
- RELEASE_SIGNING_KEY : ${{ secrets.RELEASE_SIGNING_KEY }}
117
- run : |
118
- set -e
119
- echo "$RELEASE_SIGNING_KEY"|gpg --import
120
- cd _release
121
- for asset in *; do
122
- shasum -a 256 "$asset" >"$asset.sha256"
123
- gpg --digest-algo=sha512 --detach-sig --armor -u 0x575159689BEFB442 "$asset"
124
- done
125
- - name : Set Github ref variables
126
- id : github_ref_vars
127
- run : |
128
- echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
129
- - name : Create Github release (final)
130
- if : " !startsWith(github.ref, 'refs/tags/rc/')"
131
- uses : actions/create-release@v1
132
- env :
133
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
134
- with :
135
- tag_name : ${{ github.ref }}
136
- body : |
137
- See https://haskellstack.org/ for installation and upgrade instructions.
98
+ - name : Download Linux artifact
99
+ uses : actions/download-artifact@v2
100
+ with :
101
+ name : Linux
102
+ path : _release
103
+ - name : Download macOS artifact
104
+ uses : actions/download-artifact@v2
105
+ with :
106
+ name : macOS
107
+ path : _release
108
+ - name : Download Windows artifact
109
+ uses : actions/download-artifact@v2
110
+ with :
111
+ name : Windows
112
+ path : _release
113
+ - name : Hash and sign assets
114
+ shell : bash
115
+ env :
116
+ RELEASE_SIGNING_KEY : ${{ secrets.RELEASE_SIGNING_KEY }}
117
+ run : |
118
+ set -e
119
+ echo "$RELEASE_SIGNING_KEY"|gpg --import
120
+ cd _release
121
+ for asset in *; do
122
+ shasum -a 256 "$asset" >"$asset.sha256"
123
+ gpg --digest-algo=sha512 --detach-sig --armor -u 0x575159689BEFB442 "$asset"
124
+ done
125
+ - name : Set Github ref variables
126
+ id : github_ref_vars
127
+ run : |
128
+ echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
129
+ - name : Create Github release (final)
130
+ if : " !startsWith(github.ref, 'refs/tags/rc/')"
131
+ uses : actions/create-release@v1
132
+ env :
133
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
134
+ with :
135
+ tag_name : ${{ github.ref }}
136
+ body : |
137
+ See https://haskellstack.org/ for installation and upgrade instructions.
138
138
139
- **Changes since v[INSERT PREVIOUS VERSION]:**
139
+ **Changes since v[INSERT PREVIOUS VERSION]:**
140
140
141
- [INSERT CHANGELOG]
141
+ [INSERT CHANGELOG]
142
142
143
- **Thanks to all our contributors for this release:**
143
+ **Thanks to all our contributors for this release:**
144
144
145
- [INSERT CONTRIBUTORS]
146
- draft : true
147
- prerelease : false
148
- - name : Create Github release (release candidate)
149
- if : " startsWith(github.ref, 'refs/tags/rc/')"
150
- uses : actions/create-release@v1
151
- env :
152
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
153
- with :
154
- tag_name : ${{ github.ref }}
155
- body : |
156
- **Changes since v[INSERT PREVIOUS VERSION]:**
145
+ [INSERT CONTRIBUTORS]
146
+ draft : true
147
+ prerelease : false
148
+ - name : Create Github release (release candidate)
149
+ if : " startsWith(github.ref, 'refs/tags/rc/')"
150
+ uses : actions/create-release@v1
151
+ env :
152
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
153
+ with :
154
+ tag_name : ${{ github.ref }}
155
+ body : |
156
+ **Changes since v[INSERT PREVIOUS VERSION]:**
157
157
158
- [INSERT CHANGELOG]
159
- draft : true
160
- prerelease : true
161
- - name : Upload assets to Github release (final)
162
- if : " !startsWith(github.ref, 'refs/tags/rc/')"
163
- uses : xresloader/upload-to-github-release@v1
164
- env :
165
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
166
- with :
167
- file : " _release/*"
168
- tag_name : ${{ steps.github_ref_vars.outputs.SOURCE_TAG }}
169
- draft : true
170
- prerelease : false
171
- overwrite : true
172
- - name : Upload assets to Github release (release candidate)
173
- if : " startsWith(github.ref, 'refs/tags/rc/')"
174
- uses : xresloader/upload-to-github-release@v1
175
- env :
176
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
177
- with :
178
- file : " _release/*"
179
- tag_name : ${{ steps.github_ref_vars.outputs.SOURCE_TAG }}
180
- draft : true
181
- prerelease : true
182
- overwrite : true
158
+ [INSERT CHANGELOG]
159
+ draft : true
160
+ prerelease : true
161
+ - name : Upload assets to Github release (final)
162
+ if : " !startsWith(github.ref, 'refs/tags/rc/')"
163
+ uses : xresloader/upload-to-github-release@v1
164
+ env :
165
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
166
+ with :
167
+ file : " _release/*"
168
+ tag_name : ${{ steps.github_ref_vars.outputs.SOURCE_TAG }}
169
+ draft : true
170
+ prerelease : false
171
+ overwrite : true
172
+ - name : Upload assets to Github release (release candidate)
173
+ if : " startsWith(github.ref, 'refs/tags/rc/')"
174
+ uses : xresloader/upload-to-github-release@v1
175
+ env :
176
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
177
+ with :
178
+ file : " _release/*"
179
+ tag_name : ${{ steps.github_ref_vars.outputs.SOURCE_TAG }}
180
+ draft : true
181
+ prerelease : true
182
+ overwrite : true
0 commit comments