This repository has been archived by the owner on Jul 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (57 loc) · 1.63 KB
/
publish.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
name: Build and Publish
on: push
jobs:
build:
name: Build
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@master
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Dependencies
run: |
pip install poetry
poetry install
- name: Build
run: |
mkdir -p dist
poetry run python gen-cfm.py gen
- name: Upload dist
uses: actions/upload-artifact@v1
with:
name: dist
path: dist
release:
name: Release
needs: build
if: startsWith(github.event.ref, 'refs/tags')
runs-on: ubuntu-18.04
steps:
- name: Download dist
uses: actions/download-artifact@v1
with:
name: dist
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: "" # TODO get git commit messages here automatically
draft: true
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/RDS-sanitized-snapshots.yml
asset_name: RDS-sanitized-snapshots.yml
asset_content_type: text/yaml
# TODO upload to S3 and publish quick create links?