-
Notifications
You must be signed in to change notification settings - Fork 2
85 lines (74 loc) · 2.47 KB
/
release.yml
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
name: artifacts release
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout repo content
uses: actions/checkout@v3
with:
submodules: recursive
- name: Git Submodule Update
run: |
git submodule update --remote --recursive
- name: setup python
uses: actions/setup-python@v4
with:
python-version: '3.10' # install the python version needed
- name: install python packages
run: |
cd artifact_builder
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: execute artifact_builder
run: python artifact_builder -D sql -O index.json -E postgresql
- name: Extract tag name
id: tag
uses: actions/github-script@0.2.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
return context.payload.ref.replace(/\/refs\/tags\//, '');
## In the future, we may want to release on main branch
## and place the version in a file, so it automatically
## creates the release and tag.
# - name: version
# run: echo "::set-output name=version::$(./bin/azblogfilter --version)"
# id: tag
# - name: release
# uses: actions/create-release@v1
# id: create_release
# with:
# draft: false
# prerelease: false
# release_name: ${{ steps.tag.outputs.version }}
# tag_name: ${{ github.ref }}
# body_path: CHANGELOG.md
# env:
# GITHUB_TOKEN: ${{ github.token }}
- name: Gets the latest created release info
id: latest_release_info
uses: jossef/action-latest-release-info@v1.2.1
env:
GITHUB_TOKEN: ${{ github.token }}
- name: upload artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.latest_release_info.outputs.upload_url }}
asset_path: index.json
asset_name: index.json
asset_content_type: application/json
- name: upload ndjson artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.latest_release_info.outputs.upload_url }}
asset_path: ndindex.json
asset_name: ndindex.json
asset_content_type: application/json