-
Notifications
You must be signed in to change notification settings - Fork 14
91 lines (78 loc) · 2.52 KB
/
assets.yml
File metadata and controls
91 lines (78 loc) · 2.52 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
name: release-assets
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
assets:
runs-on: ubuntu-latest
env:
BUNDLE_WITHOUT: "secryst:jsexec"
SKIP_JS: "1"
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
repository: interscript/interscript
- name: Run bootstrap script
run: ruby bootstrap.rb
- name: Use Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.0"
bundler-cache: true
- name: Install bundle
working-directory: ./ruby
run: bundle install --jobs 4 --retry 3 --with jsexec --without secryst
- name: Generate visualization json
working-directory: ./ruby
run: bundle exec rake generate_visualization_json
- name: Archive json files from the previous step
uses: thedoctor0/zip-release@master
with:
filename: 'vis_json.zip'
path: ./vis_json/*.json
directory: ./ruby/
exclusions: '*.git*'
type: zip
- name: Upload artifacts
id: upload_vis_json
uses: svenstaro/upload-release-action@2.2.1
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ruby/vis_json.zip
file_glob: true
tag: ${{ github.ref }}
overwrite: true
- name: Generate metadata
working-directory: ./ruby
run: bundle exec rake generate_metadata_json
- name: Archive metadata from the previous step
uses: thedoctor0/zip-release@master
with:
filename: 'metadata.zip'
path: ./metadata.json
directory: ./ruby/
exclusions: '*.git*'
type: zip
- name: Upload metadata
id: upload_metadata
uses: svenstaro/upload-release-action@2.2.1
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ruby/metadata.zip
asset_name: metadata.json.zip
tag: ${{ github.ref }}
overwrite: true
- name: Output link
run: |
echo ${{ steps.upload_vis_json.outputs.browser_download_url }}
echo ${{ steps.upload_metadata.outputs.browser_download_url }}
# - name: Trigger deploy at interscript.org
# uses: peter-evans/repository-dispatch@v1
# with:
# token: ${{ secrets.INTERSCRIPT_CI_TOKEN }}
# repository: interscript/interscript.org
# event-type: ${{ github.repository }}
# client-payload: '{ "ref": "${{ github.ref }}" }'