licensed 2.14.3 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 33331f661a6431bafe0966bfc183f734c9775412a23a9d952b0c232482254899
4
- data.tar.gz: d6fc25e79d8ca274eb3ca1dbf22bc187fa6a0ac1547b08777aafde2fd71612dd
3
+ metadata.gz: 26f8098aaee2e88489ccdebc2a4a37a6da75bc2bb7c1179a94eb9c62bd6428ea
4
+ data.tar.gz: f2bcc523cc918a383559164e953c3453f4b456f71ce4ea6edf6ff207adeae99e
5
5
  SHA512:
6
- metadata.gz: 7572045fdc55e4c53fd5230baed547ff4d20aa7b5bcea226f7f57035eacdf335e2ec364e3df9ad9bce6222fe46fc134066979c6cbc8a42b283070bd0a6695f74
7
- data.tar.gz: cc6ed29bffe75f17dd0c25d449afa83f3122caf442bcad6582cbc07a93c28389e5c4543ea9dea5e67f94797a24e223658cf7e4671f165f0502e385424a8402c2
6
+ metadata.gz: 5d31ba213998214f387fb053b1038c6010bfffc42babb0dcf502062a6effced42404a09f1d22741d60ab92a9723c64c6af5a0333f1576f1970c9a5adcc89f2cf
7
+ data.tar.gz: b06150a91ba3d2b0364f1c4a8347fa55b1ebd4ecbf97524e267f613dfc9138a8ced44a308fc80d25238147d1a237cead91dc8e9ccb29cd0736195d977d0aa516
@@ -3,96 +3,192 @@ name: Build and publish release assets
3
3
  on:
4
4
  release:
5
5
  types: [created]
6
+ workflow_dispatch:
7
+ inputs:
8
+ version:
9
+ description: 'Commit-like version of github/licensed to build package at'
10
+ required: true
11
+ release_tag:
12
+ description: 'Release tag to upload built packages to'
13
+ required: false
6
14
 
7
15
  jobs:
8
- package_linux:
16
+ vars:
17
+ name: "Gather values for remainder of steps"
9
18
  runs-on: ubuntu-latest
19
+ outputs:
20
+ version: ${{ steps.get_version.outputs.result }}
21
+ upload_url: ${{ steps.get_url.outputs.result }}
22
+ ref: ${{ steps.get_ref.outputs.result }}
23
+ steps:
24
+ - id: get_version
25
+ name: Get package version
26
+ uses: actions/github-script@v3
27
+ with:
28
+ github-token: ${{ secrets.GITHUB_TOKEN }}
29
+ result-encoding: string
30
+ script: |
31
+ let version = "${{ github.event.release.tag_name }}"
32
+ if (!version) {
33
+ version = "${{ github.event.inputs.version }}"
34
+ }
35
+
36
+ if (!version) {
37
+ throw new Error("unable to find package build version")
38
+ }
39
+
40
+ return version
41
+
42
+ - id: get_url
43
+ name: Get release upload url
44
+ uses: actions/github-script@v3
45
+ with:
46
+ github-token: ${{ secrets.GITHUB_TOKEN }}
47
+ result-encoding: string
48
+ script: |
49
+ let uploadUrl = "${{ github.event.release.upload_url}}"
50
+ const tag = "${{ github.event.inputs.release_tag }}"
51
+ if (!uploadUrl && tag) {
52
+ const { data: release } = await github.repos.getReleaseByTag({
53
+ ...context.repo,
54
+ tag
55
+ })
56
+
57
+ if (!release.upload_url) {
58
+ throw new Error("unable to find a release upload url")
59
+ }
60
+
61
+ uploadUrl = release.upload_url
62
+ }
63
+
64
+ return uploadUrl
65
+
66
+ - id: get_ref
67
+ name: Get checkout ref for custom build scripts
68
+ uses: actions/github-script@v3
69
+ with:
70
+ github-token: ${{ secrets.GITHUB_TOKEN }}
71
+ result-encoding: string
72
+ script: |
73
+ let ref = "${{ github.event.release.tag_name }}"
74
+ if (!ref) {
75
+ ref = "${{ github.event.ref }}".replace(/refs\/[^\/]+\//, '')
76
+ }
77
+
78
+ if (!ref) {
79
+ throw new Error("unable to find a ref for action")
80
+ }
81
+
82
+ return ref
83
+
84
+ package_linux:
85
+ needs: vars
86
+ runs-on: ubuntu-18.04
10
87
  steps:
11
88
  - uses: actions/checkout@v2
89
+ with:
90
+ # checkout at the ref for the action, separate from the target build version
91
+ # this allows running build scripts independent of the target version
92
+ ref: ${{needs.vars.outputs.ref}}
93
+ fetch-depth: 0
94
+
12
95
  - name: Set up Ruby 2.6
13
- uses: actions/setup-ruby@v1
96
+ uses: ruby/setup-ruby@v1
14
97
  with:
15
- ruby-version: 2.6.x
98
+ ruby-version: 2.6
16
99
 
17
100
  - name: Build package
18
101
  run: script/packages/linux
19
102
  env:
20
- VERSION: ${{github.event.release.tag_name}}
103
+ VERSION: ${{needs.vars.outputs.version}}
21
104
 
22
105
  - uses: actions/upload-artifact@v2
23
106
  with:
24
- name: ${{github.event.release.tag_name}}-linux
25
- path: pkg/${{github.event.release.tag_name}}/licensed-${{github.event.release.tag_name}}-linux-x64.tar.gz
107
+ name: ${{needs.vars.outputs.version}}-linux
108
+ path: pkg/${{needs.vars.outputs.version}}/licensed-${{needs.vars.outputs.version}}-linux-x64.tar.gz
26
109
 
27
110
  package_mac:
111
+ needs: vars
28
112
  runs-on: macOS-latest
29
113
  steps:
30
114
  - uses: actions/checkout@v2
115
+ with:
116
+ # checkout at the ref for the action, separate from the target build version
117
+ # this allows running build scripts independent of the target version
118
+ ref: ${{needs.vars.outputs.ref}}
119
+ fetch-depth: 0
120
+
31
121
  - name: Set up Ruby 2.6
32
- uses: actions/setup-ruby@v1
122
+ uses: ruby/setup-ruby@v1
33
123
  with:
34
- ruby-version: 2.6.x
124
+ ruby-version: 2.6
35
125
 
36
126
  - name: Build package
37
127
  run: script/packages/mac
38
128
  env:
39
- VERSION: ${{github.event.release.tag_name}}
129
+ VERSION: ${{needs.vars.outputs.version}}
40
130
 
41
131
  - uses: actions/upload-artifact@v2
42
132
  with:
43
- name: ${{github.event.release.tag_name}}-darwin
44
- path: pkg/${{github.event.release.tag_name}}/licensed-${{github.event.release.tag_name}}-darwin-x64.tar.gz
133
+ name: ${{needs.vars.outputs.version}}-darwin
134
+ path: pkg/${{needs.vars.outputs.version}}/licensed-${{needs.vars.outputs.version}}-darwin-x64.tar.gz
45
135
 
46
136
  build_gem:
137
+ needs: vars
47
138
  runs-on: ubuntu-latest
48
139
  steps:
49
140
  - uses: actions/checkout@v2
141
+ with:
142
+ # building a gem doesn't use a different ref from the version input
143
+ ref: ${{needs.vars.outputs.version}}
144
+
50
145
  - name: Set up Ruby 2.6
51
- uses: actions/setup-ruby@v1
146
+ uses: ruby/setup-ruby@v1
52
147
  with:
53
- ruby-version: 2.6.x
148
+ ruby-version: 2.6
54
149
 
55
150
  - name: Build gem
56
- run: gem build licensed.gemspec -o licensed-${{github.event.release.tag_name}}.gem
151
+ run: gem build licensed.gemspec -o licensed-${{needs.vars.outputs.version}}.gem
57
152
 
58
153
  - uses: actions/upload-artifact@v2
59
154
  with:
60
- name: ${{github.event.release.tag_name}}-gem
61
- path: licensed-${{github.event.release.tag_name}}.gem
155
+ name: ${{needs.vars.outputs.version}}-gem
156
+ path: licensed-${{needs.vars.outputs.version}}.gem
62
157
 
63
158
  upload_packages:
159
+ if: ${{ needs.vars.outputs.upload_url != '' }}
64
160
  runs-on: ubuntu-latest
65
- needs: [package_linux, package_mac, build_gem]
161
+ needs: [vars, package_linux, package_mac, build_gem]
66
162
 
67
163
  steps:
68
164
  - name: Set up Ruby 2.6
69
- uses: actions/setup-ruby@v1
165
+ uses: ruby/setup-ruby@v1
70
166
  with:
71
- ruby-version: 2.6.x
167
+ ruby-version: 2.6
72
168
 
73
169
  - name: Download linux package
74
170
  uses: actions/download-artifact@v2
75
171
  with:
76
- name: ${{github.event.release.tag_name}}-linux
172
+ name: ${{needs.vars.outputs.version}}-linux
77
173
 
78
174
  - name: Download macOS package
79
175
  uses: actions/download-artifact@v2
80
176
  with:
81
- name: ${{github.event.release.tag_name}}-darwin
177
+ name: ${{needs.vars.outputs.version}}-darwin
82
178
 
83
179
  - name: Download gem
84
180
  uses: actions/download-artifact@v2
85
181
  with:
86
- name: ${{github.event.release.tag_name}}-gem
182
+ name: ${{needs.vars.outputs.version}}-gem
87
183
 
88
184
  - name: Publish linux package
89
185
  uses: actions/upload-release-asset@v1
90
186
  env:
91
187
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
92
188
  with:
93
- upload_url: ${{ github.event.release.upload_url }}
94
- asset_path: ./licensed-${{github.event.release.tag_name}}-linux-x64.tar.gz
95
- asset_name: licensed-${{github.event.release.tag_name}}-linux-x64.tar.gz
189
+ upload_url: ${{ needs.vars.outputs.upload_url }}
190
+ asset_path: ./licensed-${{needs.vars.outputs.version}}-linux-x64.tar.gz
191
+ asset_name: licensed-${{needs.vars.outputs.version}}-linux-x64.tar.gz
96
192
  asset_content_type: application/gzip
97
193
 
98
194
  - name: Publish mac package
@@ -100,9 +196,9 @@ jobs:
100
196
  env:
101
197
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
102
198
  with:
103
- upload_url: ${{ github.event.release.upload_url }}
104
- asset_path: ./licensed-${{github.event.release.tag_name}}-darwin-x64.tar.gz
105
- asset_name: licensed-${{github.event.release.tag_name}}-darwin-x64.tar.gz
199
+ upload_url: ${{ needs.vars.outputs.upload_url }}
200
+ asset_path: ./licensed-${{needs.vars.outputs.version}}-darwin-x64.tar.gz
201
+ asset_name: licensed-${{needs.vars.outputs.version}}-darwin-x64.tar.gz
106
202
  asset_content_type: application/gzip
107
203
 
108
204
  - name: Publish gem to RubyGems
@@ -114,4 +210,4 @@ jobs:
114
210
  gem push $GEM
115
211
  env:
116
212
  RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_AUTH_TOKEN}}
117
- GEM: licensed-${{github.event.release.tag_name}}.gem
213
+ GEM: licensed-${{needs.vars.outputs.version}}.gem
@@ -8,15 +8,15 @@ jobs:
8
8
  steps:
9
9
  - uses: actions/checkout@v2
10
10
  - name: Setup node
11
- uses: actions/setup-node@v1
11
+ uses: actions/setup-node@v2
12
12
  with:
13
13
  node-version: 8
14
14
  - name: Install Bower
15
15
  run: npm install -g bower
16
16
  - name: Set up Ruby
17
- uses: actions/setup-ruby@v1
17
+ uses: ruby/setup-ruby@v1
18
18
  with:
19
- ruby-version: 2.6.x
19
+ ruby-version: 2.6
20
20
  - run: bundle lock
21
21
  - uses: actions/cache@v1
22
22
  with:
@@ -37,9 +37,9 @@ jobs:
37
37
  steps:
38
38
  - uses: actions/checkout@v2
39
39
  - name: Set up Ruby
40
- uses: actions/setup-ruby@v1
40
+ uses: ruby/setup-ruby@v1
41
41
  with:
42
- ruby-version: 2.6.x
42
+ ruby-version: 2.6
43
43
  - name: Set up Bundler
44
44
  run: |
45
45
  yes | gem uninstall bundler --all
@@ -60,16 +60,16 @@ jobs:
60
60
  runs-on: ubuntu-latest
61
61
  strategy:
62
62
  matrix:
63
- ghc: [ '8.2.2', '8.6.5' ]
64
- cabal: [ '2.2', '2.4', '3.0', 'latest' ]
63
+ ghc: [ '8.2', '8.6', '8.8', '8.10' ]
64
+ cabal: [ '2.4', '3.0', '3.2' ]
65
65
  steps:
66
66
  - uses: actions/checkout@v2
67
67
  - name: Set up Ruby
68
- uses: actions/setup-ruby@v1
68
+ uses: ruby/setup-ruby@v1
69
69
  with:
70
- ruby-version: 2.6.x
70
+ ruby-version: 2.6
71
71
  - name: Setup Haskell
72
- uses: actions/setup-haskell@v1
72
+ uses: haskell/actions/setup@v1
73
73
  with:
74
74
  ghc-version: ${{ matrix.ghc }}
75
75
  cabal-version: ${{ matrix.cabal }}
@@ -89,17 +89,17 @@ jobs:
89
89
  runs-on: ubuntu-latest
90
90
  strategy:
91
91
  matrix:
92
- php: [ '5.6', '7.1', '7.2', '7.3' ]
92
+ php: [ '7.3', '7.4' ]
93
93
  steps:
94
94
  - uses: actions/checkout@v2
95
95
  - name: Setup php
96
- uses: nanasess/setup-php@v3.0.4
96
+ uses: nanasess/setup-php@v3.0.6
97
97
  with:
98
98
  php-version: ${{ matrix.php }}
99
99
  - name: Set up Ruby
100
- uses: actions/setup-ruby@v1
100
+ uses: ruby/setup-ruby@v1
101
101
  with:
102
- ruby-version: 2.6.x
102
+ ruby-version: 2.6
103
103
  - run: bundle lock
104
104
  - uses: actions/cache@v1
105
105
  with:
@@ -116,11 +116,11 @@ jobs:
116
116
  runs-on: ubuntu-latest
117
117
  strategy:
118
118
  matrix:
119
- ruby: [ 2.4.x, 2.5.x, 2.6.x, 2.7.x ]
119
+ ruby: [ 2.5, 2.6, 2.7 ]
120
120
  steps:
121
121
  - uses: actions/checkout@v2
122
122
  - name: Set up Ruby
123
- uses: actions/setup-ruby@v1
123
+ uses: ruby/setup-ruby@v1
124
124
  with:
125
125
  ruby-version: ${{matrix.ruby}}
126
126
  - name: Set up Bundler
@@ -146,9 +146,9 @@ jobs:
146
146
  with:
147
147
  go-version: 1.10.x
148
148
  - name: Set up Ruby
149
- uses: actions/setup-ruby@v1
149
+ uses: ruby/setup-ruby@v1
150
150
  with:
151
- ruby-version: 2.6.x
151
+ ruby-version: 2.6
152
152
  - run: bundle lock
153
153
  - uses: actions/cache@v1
154
154
  with:
@@ -173,9 +173,9 @@ jobs:
173
173
  with:
174
174
  go-version: ${{ matrix.go }}
175
175
  - name: Set up Ruby
176
- uses: actions/setup-ruby@v1
176
+ uses: ruby/setup-ruby@v1
177
177
  with:
178
- ruby-version: 2.6.x
178
+ ruby-version: 2.6
179
179
  - run: bundle lock
180
180
  - uses: actions/cache@v1
181
181
  with:
@@ -193,9 +193,9 @@ jobs:
193
193
  steps:
194
194
  - uses: actions/checkout@v2
195
195
  - name: Set up Ruby
196
- uses: actions/setup-ruby@v1
196
+ uses: ruby/setup-ruby@v1
197
197
  with:
198
- ruby-version: 2.6.x
198
+ ruby-version: 2.6
199
199
  - run: bundle lock
200
200
  - uses: actions/cache@v1
201
201
  with:
@@ -213,9 +213,9 @@ jobs:
213
213
  steps:
214
214
  - uses: actions/checkout@v2
215
215
  - name: Set up Ruby
216
- uses: actions/setup-ruby@v1
216
+ uses: ruby/setup-ruby@v1
217
217
  with:
218
- ruby-version: 2.6.x
218
+ ruby-version: 2.6
219
219
  - run: bundle lock
220
220
  - uses: actions/cache@v1
221
221
  with:
@@ -230,18 +230,18 @@ jobs:
230
230
  runs-on: ubuntu-latest
231
231
  strategy:
232
232
  matrix:
233
- otp: [21.x, 22.x]
234
- elixir: [1.8.x, 1.9.x]
233
+ otp: [21.x, 22.x, 23.x]
234
+ elixir: [ 1.10.x, 1.11.x ]
235
235
  steps:
236
236
  - uses: actions/checkout@v2
237
- - uses: actions/setup-elixir@v1.0.0
237
+ - uses: erlef/setup-elixir@v1.6.0
238
238
  with:
239
239
  otp-version: ${{matrix.otp}}
240
240
  elixir-version: ${{matrix.elixir}}
241
241
  - name: Set up Ruby
242
- uses: actions/setup-ruby@v1
242
+ uses: ruby/setup-ruby@v1
243
243
  with:
244
- ruby-version: 2.6.x
244
+ ruby-version: 2.6
245
245
  - run: bundle lock
246
246
  - uses: actions/cache@v1
247
247
  with:
@@ -258,17 +258,17 @@ jobs:
258
258
  runs-on: ubuntu-latest
259
259
  strategy:
260
260
  matrix:
261
- node_version: [ 8, 10, 12 ]
261
+ node_version: [ 10, 12, 14, 15 ]
262
262
  steps:
263
263
  - uses: actions/checkout@v2
264
264
  - name: Setup node
265
- uses: actions/setup-node@v1
265
+ uses: actions/setup-node@v2
266
266
  with:
267
267
  node-version: ${{ matrix.node_version }}
268
268
  - name: Set up Ruby
269
- uses: actions/setup-ruby@v1
269
+ uses: ruby/setup-ruby@v1
270
270
  with:
271
- ruby-version: 2.6.x
271
+ ruby-version: 2.6
272
272
  - run: bundle lock
273
273
  - uses: actions/cache@v1
274
274
  with:
@@ -290,9 +290,9 @@ jobs:
290
290
  with:
291
291
  dotnet-version: 3.1.202
292
292
  - name: Set up Ruby
293
- uses: actions/setup-ruby@v1
293
+ uses: ruby/setup-ruby@v1
294
294
  with:
295
- ruby-version: 2.6.x
295
+ ruby-version: 2.6
296
296
  - run: bundle lock
297
297
  - uses: actions/cache@v1
298
298
  with:
@@ -318,9 +318,9 @@ jobs:
318
318
  python-version: ${{ matrix.python }}
319
319
  architecture: x64
320
320
  - name: Set up Ruby
321
- uses: actions/setup-ruby@v1
321
+ uses: ruby/setup-ruby@v1
322
322
  with:
323
- ruby-version: 2.6.x
323
+ ruby-version: 2.6
324
324
  - run: bundle lock
325
325
  - uses: actions/cache@v1
326
326
  with:
@@ -345,9 +345,9 @@ jobs:
345
345
  python-version: '3.x'
346
346
  architecture: x64
347
347
  - name: Set up Ruby
348
- uses: actions/setup-ruby@v1
348
+ uses: ruby/setup-ruby@v1
349
349
  with:
350
- ruby-version: 2.6.x
350
+ ruby-version: 2.6
351
351
  - run: bundle lock
352
352
  - uses: actions/cache@v1
353
353
  with:
@@ -371,7 +371,7 @@ jobs:
371
371
  steps:
372
372
  - uses: actions/checkout@v2
373
373
  - name: Setup node
374
- uses: actions/setup-node@v1
374
+ uses: actions/setup-node@v2
375
375
  with:
376
376
  node-version: 12
377
377
  - name: Install Yarn
@@ -379,9 +379,9 @@ jobs:
379
379
  env:
380
380
  YARN_VERSION: ${{ matrix.yarn_version }}
381
381
  - name: Set up Ruby
382
- uses: actions/setup-ruby@v1
382
+ uses: ruby/setup-ruby@v1
383
383
  with:
384
- ruby-version: 2.6.x
384
+ ruby-version: 2.6
385
385
  - run: bundle lock
386
386
  - uses: actions/cache@v1
387
387
  with: